(()=>{var Oa=Object.create;var nt=Object.defineProperty,Ta=Object.defineProperties,ui=Object.getOwnPropertyDescriptor,Pa=Object.getOwnPropertyDescriptors,Ea=Object.getOwnPropertyNames,pi=Object.getOwnPropertySymbols,Ia=Object.getPrototypeOf,fi=Object.prototype.hasOwnProperty,Ra=Object.prototype.propertyIsEnumerable,mi=Math.pow,gi=(t,e,r)=>e in t?nt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,w=(t,e)=>{for(var r in e||(e={}))fi.call(e,r)&&gi(t,r,e[r]);if(pi)for(var r of pi(e))Ra.call(e,r)&&gi(t,r,e[r]);return t},D=(t,e)=>Ta(t,Pa(e)),Ma=t=>nt(t,"__esModule",{value:!0});var yi=(t=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(t,{get:(e,r)=>(typeof require!="undefined"?require:e)[r]}):t)(function(t){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+t+'" is not supported')});var k=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var _a=(t,e,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Ea(e))!fi.call(t,n)&&n!=="default"&&nt(t,n,{get:()=>e[n],enumerable:!(r=ui(e,n))||r.enumerable});return t},R=t=>_a(Ma(nt(t!=null?Oa(Ia(t)):{},"default",t&&t.__esModule&&"default"in t?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t),O=(t,e,r,n)=>{for(var i=n>1?void 0:n?ui(e,r):e,s=t.length-1,a;s>=0;s--)(a=t[s])&&(i=(n?a(e,r,i):a(i))||i);return n&&i&&nt(e,r,i),i};var p=(t,e,r)=>new Promise((n,i)=>{var s=u=>{try{l(r.next(u))}catch(m){i(m)}},a=u=>{try{l(r.throw(u))}catch(m){i(m)}},l=u=>u.done?n(u.value):Promise.resolve(u.value).then(s,a);l((r=r.apply(t,e)).next())});var M=k((tu,Bt)=>{var hi,bi,vi,Si,xi,wi,ki,Ci,Ai,jt,qr,Oi,Ti,Pi,Ae,Ei,Ii,Ri,Mi,_i,Di,Hi,Li,qi,Ut;(function(t){var e=typeof global=="object"?global:typeof self=="object"?self:typeof this=="object"?this:{};typeof define=="function"&&undefined?define("tslib",["exports"],function(n){t(r(e,r(n)))}):typeof Bt=="object"&&typeof Bt.exports=="object"?t(r(e,r(Bt.exports))):t(r(e));function r(n,i){return n!==e&&(typeof Object.create=="function"?Object.defineProperty(n,"__esModule",{value:!0}):n.__esModule=!0),function(s,a){return n[s]=i?i(s,a):a}}})(function(t){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])};hi=function(n,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");e(n,i);function s(){this.constructor=n}n.prototype=i===null?Object.create(i):(s.prototype=i.prototype,new s)},bi=Object.assign||function(n){for(var i,s=1,a=arguments.length;s=0;h--)(m=n[h])&&(u=(l<3?m(u):l>3?m(i,s,u):m(i,s))||u);return l>3&&u&&Object.defineProperty(i,s,u),u},xi=function(n,i){return function(s,a){i(s,a,n)}},wi=function(n,i){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(n,i)},ki=function(n,i,s,a){function l(u){return u instanceof s?u:new s(function(m){m(u)})}return new(s||(s=Promise))(function(u,m){function h(b){try{S(a.next(b))}catch(se){m(se)}}function A(b){try{S(a.throw(b))}catch(se){m(se)}}function S(b){b.done?u(b.value):l(b.value).then(h,A)}S((a=a.apply(n,i||[])).next())})},Ci=function(n,i){var s={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},a,l,u,m;return m={next:h(0),throw:h(1),return:h(2)},typeof Symbol=="function"&&(m[Symbol.iterator]=function(){return this}),m;function h(S){return function(b){return A([S,b])}}function A(S){if(a)throw new TypeError("Generator is already executing.");for(;s;)try{if(a=1,l&&(u=S[0]&2?l.return:S[0]?l.throw||((u=l.return)&&u.call(l),0):l.next)&&!(u=u.call(l,S[1])).done)return u;switch(l=0,u&&(S=[S[0]&2,u.value]),S[0]){case 0:case 1:u=S;break;case 4:return s.label++,{value:S[1],done:!1};case 5:s.label++,l=S[1],S=[0];continue;case 7:S=s.ops.pop(),s.trys.pop();continue;default:if(u=s.trys,!(u=u.length>0&&u[u.length-1])&&(S[0]===6||S[0]===2)){s=0;continue}if(S[0]===3&&(!u||S[1]>u[0]&&S[1]=n.length&&(n=void 0),{value:n&&n[a++],done:!n}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")},qr=function(n,i){var s=typeof Symbol=="function"&&n[Symbol.iterator];if(!s)return n;var a=s.call(n),l,u=[],m;try{for(;(i===void 0||i-- >0)&&!(l=a.next()).done;)u.push(l.value)}catch(h){m={error:h}}finally{try{l&&!l.done&&(s=a.return)&&s.call(a)}finally{if(m)throw m.error}}return u},Oi=function(){for(var n=[],i=0;i1||h(H,Ce)})})}function h(H,Ce){try{A(a[H](Ce))}catch(_r){se(u[0][3],_r)}}function A(H){H.value instanceof Ae?Promise.resolve(H.value.v).then(S,b):se(u[0][2],H)}function S(H){h("next",H)}function b(H){h("throw",H)}function se(H,Ce){H(Ce),u.shift(),u.length&&h(u[0][0],u[0][1])}},Ii=function(n){var i,s;return i={},a("next"),a("throw",function(l){throw l}),a("return"),i[Symbol.iterator]=function(){return this},i;function a(l,u){i[l]=n[l]?function(m){return(s=!s)?{value:Ae(n[l](m)),done:l==="return"}:u?u(m):m}:u}},Ri=function(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=n[Symbol.asyncIterator],s;return i?i.call(n):(n=typeof jt=="function"?jt(n):n[Symbol.iterator](),s={},a("next"),a("throw"),a("return"),s[Symbol.asyncIterator]=function(){return this},s);function a(u){s[u]=n[u]&&function(m){return new Promise(function(h,A){m=n[u](m),l(h,A,m.done,m.value)})}}function l(u,m,h,A){Promise.resolve(A).then(function(S){u({value:S,done:h})},m)}},Mi=function(n,i){return Object.defineProperty?Object.defineProperty(n,"raw",{value:i}):n.raw=i,n};var r=Object.create?function(n,i){Object.defineProperty(n,"default",{enumerable:!0,value:i})}:function(n,i){n.default=i};_i=function(n){if(n&&n.__esModule)return n;var i={};if(n!=null)for(var s in n)s!=="default"&&Object.prototype.hasOwnProperty.call(n,s)&&Ut(i,n,s);return r(i,n),i},Di=function(n){return n&&n.__esModule?n:{default:n}},Hi=function(n,i,s,a){if(s==="a"&&!a)throw new TypeError("Private accessor was defined without a getter");if(typeof i=="function"?n!==i||!a:!i.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return s==="m"?a:s==="a"?a.call(n):a?a.value:i.get(n)},Li=function(n,i,s,a,l){if(a==="m")throw new TypeError("Private method is not writable");if(a==="a"&&!l)throw new TypeError("Private accessor was defined without a setter");if(typeof i=="function"?n!==i||!l:!i.has(n))throw new TypeError("Cannot write private member to an object whose class did not declare it");return a==="a"?l.call(n,s):l?l.value=s:i.set(n,s),s},qi=function(n,i){if(i===null||typeof i!="object"&&typeof i!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof n=="function"?i===n:n.has(i)},t("__extends",hi),t("__assign",bi),t("__rest",vi),t("__decorate",Si),t("__param",xi),t("__metadata",wi),t("__awaiter",ki),t("__generator",Ci),t("__exportStar",Ai),t("__createBinding",Ut),t("__values",jt),t("__read",qr),t("__spread",Oi),t("__spreadArrays",Ti),t("__spreadArray",Pi),t("__await",Ae),t("__asyncGenerator",Ei),t("__asyncDelegator",Ii),t("__asyncValues",Ri),t("__makeTemplateObject",Mi),t("__importStar",_i),t("__importDefault",Di),t("__classPrivateFieldGet",Hi),t("__classPrivateFieldSet",Li),t("__classPrivateFieldIn",qi)})});var it=k(Oe=>{"use strict";Object.defineProperty(Oe,"__esModule",{value:!0});Oe.compose=Oe.CompositeTransducer=void 0;var jr=class{constructor(e,r){this.a=e,this.b=r}async_(e){return this.b.async_(this.a.async_(e))}sync(e){return this.b.sync(this.a.sync(e))}};Oe.CompositeTransducer=jr;function Da(t,e){return new jr(t,e)}Oe.compose=Da});var ji=k(Gt=>{"use strict";Object.defineProperty(Gt,"__esModule",{value:!0});Gt.decompose=void 0;var Ha=it();function*Ur(t){t instanceof Ha.CompositeTransducer?(yield*Ur(t.a),yield*Ur(t.b)):yield t}Gt.decompose=Ur});var $=k(x=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0});x.syncReturned=x.asyncReturned=x.isReturned=x.isYielded=x.AsyncIteratorHandler=x.by=x.toAsyncIterable=x.isArrayLike=x.asyncIterable=x.iterable=x.toIterable=x.isPromiseLike=x.isAsyncIterable=x.isIterable=x.value=x.key=x.comparators=x.descending=x.ascending=void 0;var ae=M();function Wt(t,e){return te?1:0}x.ascending=Wt;function La(t,e){return te?-1:0}x.descending=La;function qa(...t){return(e,r)=>{for(let n of t){let i=n(e,r);if(i!=0)return i}return 0}}x.comparators=qa;function ja(t){return Object.assign(e=>e[t],{name:t})}x.key=ja;function Ua(t){return e=>e[t]}x.value=Ua;function Ba(t){return typeof t=="object"&&Symbol.iterator in t}x.isIterable=Ba;function Ga(t){return typeof t=="object"&&Symbol.asyncIterator in t}x.isAsyncIterable=Ga;function Wa(t){return typeof t=="object"&&"then"in t}x.isPromiseLike=Wa;function Fa(...t){return t}x.toIterable=Fa;function*Ka(t){for(let e=0;ee(r[t],n[t])}function Ya(t,e=Wt){return(r,n)=>e(t(r),t(n))}var Ui=class{constructor(){this.handlers=[],this.state=[]}value(e){this.newState({value:e,done:!1})}error(e){this.newState(e)}close(e){this.newState({value:e,done:!0})}[Symbol.asyncIterator](){return this}next(){return new Promise((e,r)=>{this.newHandler([e,r])})}newState(e){let r=this.handlers.shift();if(typeof r=="undefined")return this.state.push(e);let n=this.state.shift();if(typeof n=="undefined")return this.consume(e,r);this.consume(n,r),this.newState(e)}newHandler(e){let r=this.state.shift();if(typeof r=="undefined")return this.handlers.push(e);let n=this.handlers.shift();if(typeof n=="undefined")return this.consume(r,e);this.consume(r,n),this.newHandler(e)}consume(e,[r,n]){e instanceof Error?n(e):r(e)}};x.AsyncIteratorHandler=Ui;function Za(t){return t&&typeof t=="object"&&"yielded"in t}x.isYielded=Za;function Qa(t){return t&&typeof t=="object"&&"returned"in t}x.isReturned=Qa;function Xa(t){return ae.__asyncGenerator(this,arguments,function*(){for(;;){let{value:r,done:n}=yield ae.__await(t.next());if(n){yield yield ae.__await({returned:r});break}else yield yield ae.__await({yielded:r})}})}x.asyncReturned=Xa;function*ec(t){for(;;){let{value:e,done:r}=t.next();if(r){yield{returned:e};break}else yield{yielded:e}}}x.syncReturned=ec});var Bi=k(Pe=>{"use strict";Object.defineProperty(Pe,"__esModule",{value:!0});Pe.dedupe=Pe.DedupeTransducer=void 0;var Te=M(),tc=$(),Br=class{constructor(e){this.comparator=e}async_(e){return Te.__asyncGenerator(this,arguments,function*(){var n,i;let s;try{for(var a=Te.__asyncValues(e),l;l=yield Te.__await(a.next()),!l.done;){let u=l.value;typeof s=="undefined"?yield yield Te.__await(u):this.comparator(u,s)!==0&&(yield yield Te.__await(u)),s=u}}catch(u){n={error:u}}finally{try{l&&!l.done&&(i=a.return)&&(yield Te.__await(i.call(a)))}finally{if(n)throw n.error}}})}*sync(e){let r;for(let n of e)typeof r=="undefined"?yield n:this.comparator(n,r)!==0&&(yield n),r=n}};Pe.DedupeTransducer=Br;function rc(t=tc.ascending){return new Br(t)}Pe.dedupe=rc});var Gi=k(Ee=>{"use strict";Object.defineProperty(Ee,"__esModule",{value:!0});Ee.drop=Ee.DropTransducer=void 0;var ot=M(),Gr=class{constructor(e){if(this.count=e,typeof e=="undefined")throw new Error("Count can not be undefined")}async_(e){return ot.__asyncGenerator(this,arguments,function*(){var n,i;try{for(var s=ot.__asyncValues(e),a;a=yield ot.__await(s.next()),!a.done;){let l=a.value;--this.count<0&&(yield yield ot.__await(l))}}catch(l){n={error:l}}finally{try{a&&!a.done&&(i=s.return)&&(yield ot.__await(i.call(s)))}finally{if(n)throw n.error}}})}*sync(e){for(let r of e)--this.count<0&&(yield r)}};Ee.DropTransducer=Gr;function nc(t){return new Gr(t)}Ee.drop=nc});var Wi=k(Ie=>{"use strict";Object.defineProperty(Ie,"__esModule",{value:!0});Ie.dropWhile=Ie.DropWhileTransducer=void 0;var st=M(),Wr=class{constructor(e){this.predicate=e}async_(e){return st.__asyncGenerator(this,arguments,function*(){var n,i;let s=!0;try{for(var a=st.__asyncValues(e),l;l=yield st.__await(a.next()),!l.done;){let u=l.value;s&&(s=this.predicate(u)),s||(yield yield st.__await(u))}}catch(u){n={error:u}}finally{try{l&&!l.done&&(i=a.return)&&(yield st.__await(i.call(a)))}finally{if(n)throw n.error}}})}*sync(e){let r=!0;for(let n of e)r&&(r=this.predicate(n)),r||(yield n)}};Ie.DropWhileTransducer=Wr;function ic(t){return new Wr(t)}Ie.dropWhile=ic});var Ft=k(ce=>{"use strict";Object.defineProperty(ce,"__esModule",{value:!0});ce.accept=ce.filter=ce.FilterTransducer=void 0;var at=M(),Fr=class{constructor(e){this.predicate=e}async_(e){return at.__asyncGenerator(this,arguments,function*(){var n,i;try{for(var s=at.__asyncValues(e),a;a=yield at.__await(s.next()),!a.done;){let l=a.value;this.predicate(l)&&(yield yield at.__await(l))}}catch(l){n={error:l}}finally{try{a&&!a.done&&(i=s.return)&&(yield at.__await(i.call(s)))}finally{if(n)throw n.error}}})}*sync(e){for(let r of e)this.predicate(r)&&(yield r)}};ce.FilterTransducer=Fr;function Fi(t){return new Fr(t)}ce.filter=Fi;ce.accept=Fi});var zr=k(Me=>{"use strict";Object.defineProperty(Me,"__esModule",{value:!0});Me.first=Me.FirstTransducer=void 0;var Re=M(),Kr=class{async_(e){return Re.__asyncGenerator(this,arguments,function*(){var n,i;try{for(var s=Re.__asyncValues(e),a;a=yield Re.__await(s.next()),!a.done;){let l=a.value;return yield Re.__await(yield yield Re.__await(l))}}catch(l){n={error:l}}finally{try{a&&!a.done&&(i=s.return)&&(yield Re.__await(i.call(s)))}finally{if(n)throw n.error}}})}*sync(e){for(let r of e)return yield r}};Me.FirstTransducer=Kr;function oc(){return new Kr}Me.first=oc});var Ki=k(Kt=>{"use strict";Object.defineProperty(Kt,"__esModule",{value:!0});Kt.find=void 0;var sc=Ft(),ac=zr(),cc=it();function lc(t){return(0,cc.compose)((0,sc.filter)(t),(0,ac.first)())}Kt.find=lc});var zi=k(_e=>{"use strict";Object.defineProperty(_e,"__esModule",{value:!0});_e.flatMap=_e.FlatMapTransducer=void 0;var ge=M(),Vr=class{constructor(e){this.mapper=e}async_(e){return ge.__asyncGenerator(this,arguments,function*(){var n,i;try{for(var s=ge.__asyncValues(e),a;a=yield ge.__await(s.next()),!a.done;){let l=a.value;yield ge.__await(yield*ge.__asyncDelegator(ge.__asyncValues(this.mapper(l))))}}catch(l){n={error:l}}finally{try{a&&!a.done&&(i=s.return)&&(yield ge.__await(i.call(s)))}finally{if(n)throw n.error}}})}*sync(e){for(let r of e)yield*this.mapper(r)}};_e.FlatMapTransducer=Vr;function dc(t){return new Vr(t)}_e.flatMap=dc});var Ni=k(le=>{"use strict";Object.defineProperty(le,"__esModule",{value:!0});le.transducer=le.identity=le.IdentityTransducer=void 0;var Nr=class{async_(e){return e}sync(e){return e}};le.IdentityTransducer=Nr;function Vi(){return new Nr}le.identity=Vi;le.transducer=Vi});var Jr=k(De=>{"use strict";Object.defineProperty(De,"__esModule",{value:!0});De.last=De.LastTransducer=void 0;var ct=M(),$r=class{async_(e){return ct.__asyncGenerator(this,arguments,function*(){var n,i;let s;try{for(var a=ct.__asyncValues(e),l;l=yield ct.__await(a.next()),!l.done;)s=l.value}catch(u){n={error:u}}finally{try{l&&!l.done&&(i=a.return)&&(yield ct.__await(i.call(a)))}finally{if(n)throw n.error}}s!==void 0&&(yield yield ct.__await(s))})}*sync(e){let r;for(r of e);r!==void 0&&(yield r)}};De.LastTransducer=$r;function uc(){return new $r}De.last=uc});var $i=k(He=>{"use strict";Object.defineProperty(He,"__esModule",{value:!0});He.map=He.MapTransducer=void 0;var lt=M(),Yr=class{constructor(e){this.mapper=e}async_(e){return lt.__asyncGenerator(this,arguments,function*(){var n,i;try{for(var s=lt.__asyncValues(e),a;a=yield lt.__await(s.next()),!a.done;){let l=a.value;yield yield lt.__await(this.mapper(l))}}catch(l){n={error:l}}finally{try{a&&!a.done&&(i=s.return)&&(yield lt.__await(i.call(s)))}finally{if(n)throw n.error}}})}*sync(e){for(let r of e)yield this.mapper(r)}};He.MapTransducer=Yr;function pc(t){return new Yr(t)}He.map=pc});var Qr=k(qe=>{"use strict";Object.defineProperty(qe,"__esModule",{value:!0});qe.scan=qe.ScanTransducer=void 0;var Le=M(),Zr=class{constructor(e,r){this.reducer=e,this.seed=r}async_(e){return Le.__asyncGenerator(this,arguments,function*(){var n,i;let s=this.seed;yield yield Le.__await(s);try{for(var a=Le.__asyncValues(e),l;l=yield Le.__await(a.next()),!l.done;){let u=l.value;yield yield Le.__await(s=this.reducer(s,u))}}catch(u){n={error:u}}finally{try{l&&!l.done&&(i=a.return)&&(yield Le.__await(i.call(a)))}finally{if(n)throw n.error}}})}*sync(e){let r=this.seed;yield r;for(let n of e)yield r=this.reducer(r,n)}};qe.ScanTransducer=Zr;function fc(t,e){return new Zr(t,e)}qe.scan=fc});var Ji=k(zt=>{"use strict";Object.defineProperty(zt,"__esModule",{value:!0});zt.reduce=void 0;var mc=it(),gc=Jr(),yc=Qr();function hc(t,e){return(0,mc.compose)((0,yc.scan)(t,e),(0,gc.last)())}zt.reduce=hc});var Yi=k(Vt=>{"use strict";Object.defineProperty(Vt,"__esModule",{value:!0});Vt.reject=void 0;var bc=Ft();function vc(t){return new bc.FilterTransducer(e=>!t(e))}Vt.reject=vc});var Zi=k(Z=>{"use strict";Object.defineProperty(Z,"__esModule",{value:!0});Z.sum=Z.subtract=Z.add=Z.increment=void 0;function Sc(t){return t+1}Z.increment=Sc;function xc(t,e){return e===void 0?r=>t+r:t+e}Z.add=xc;function wc(t,e){return e===void 0?r=>r-t:t-e}Z.subtract=wc;var kc=(t,e)=>t+e;Z.sum=kc});var Jt=k(W=>{"use strict";Object.defineProperty(W,"__esModule",{value:!0});W.AsyncSequence=W.Sequence=W.sequence=W.range=W.repeat=W.iterate=void 0;var Xr=Zi(),en=$(),Qi=dt();function*Nt(t,e){for(;;)yield e,e=t(e)}W.iterate=Nt;function*Cc(t){for(;;)yield t()}W.repeat=Cc;function*Ac(t,e,r=1){if(r===0)throw new Error("step can not be 0");if(e===void 0)yield*Nt((0,Xr.add)(r),t);else{let n=Math.abs(r);ei>=e)):yield*tn(Nt((0,Xr.add)(n),t),(0,Qi.takeWhile)(i=>i<=e))}}W.range=Ac;function tn(t,...e){return(0,en.isIterable)(t)?new $t(t,e):(0,en.isArrayLike)(t)?new $t((0,en.iterable)(t),e):new rn(t,e)}W.sequence=tn;var $t=class{constructor(e,r){this.source=e,this.transducers=r}[Symbol.iterator](){return this.transducers.reduce((e,r)=>r.sync(e),this.source)[Symbol.iterator]()}};W.Sequence=$t;var rn=class{constructor(e,r){this.source=e,this.transducers=r}[Symbol.asyncIterator](){return this.transducers.reduce((e,r)=>r.async_(e),this.source)[Symbol.asyncIterator]()}};W.AsyncSequence=rn});var to=k(Yt=>{"use strict";Object.defineProperty(Yt,"__esModule",{value:!0});Yt.single=void 0;var Xi=M(),Oc=$(),eo=Jt();function Tc(t,...e){return(0,Oc.isIterable)(t)?Pc((0,eo.sequence)(t,...e)):Ec((0,eo.sequence)(t,...e))}Yt.single=Tc;function Pc(t){for(let e of t)return e;throw new Error("Expected a single value")}function Ec(t){var e,r,n,i;return Xi.__awaiter(this,void 0,void 0,function*(){try{for(e=Xi.__asyncValues(t);r=yield e.next(),!r.done;)return r.value}catch(s){n={error:s}}finally{try{r&&!r.done&&(i=e.return)&&(yield i.call(e))}finally{if(n)throw n.error}}throw new Error("Expected a single value")})}});var nn=k(Zt=>{"use strict";Object.defineProperty(Zt,"__esModule",{value:!0});Zt.array=void 0;var ro=M(),no=$(),io=Jt();function Ic(t,...e){return(0,no.isIterable)(t)||(0,no.isArrayLike)(t)?Rc((0,io.sequence)(t,...e)):Mc((0,io.sequence)(t,...e))}Zt.array=Ic;function Rc(t){let e=[];for(let r of t)e.push(r);return e}function Mc(t){var e,r,n,i;return ro.__awaiter(this,void 0,void 0,function*(){let s=[];try{for(e=ro.__asyncValues(t);r=yield e.next(),!r.done;){let a=r.value;s.push(a)}}catch(a){n={error:a}}finally{try{r&&!r.done&&(i=e.return)&&(yield i.call(e))}finally{if(n)throw n.error}}return s})}});var so=k(je=>{"use strict";Object.defineProperty(je,"__esModule",{value:!0});je.sort=je.SortTransducer=void 0;var ut=M(),_c=$(),oo=nn(),on=class{constructor(e){this.comparator=e}async_(e){return ut.__asyncGenerator(this,arguments,function*(){let n=yield ut.__await((0,oo.array)(e));n.sort(this.comparator),yield ut.__await(yield*ut.__asyncDelegator(ut.__asyncValues(n)))})}*sync(e){let r=(0,oo.array)(e);r.sort(this.comparator),yield*r}};je.SortTransducer=on;function Dc(t=_c.ascending){return new on(t)}je.sort=Dc});var ao=k(Ue=>{"use strict";Object.defineProperty(Ue,"__esModule",{value:!0});Ue.take=Ue.TakeTransducer=void 0;var ye=M(),sn=class{constructor(e){if(this.count=e,typeof e=="undefined")throw new Error("Count can not be undefined")}async_(e){return ye.__asyncGenerator(this,arguments,function*(){var n,i;if(this.count<1)return yield ye.__await(void 0);try{for(var s=ye.__asyncValues(e),a;a=yield ye.__await(s.next()),!a.done;){let l=a.value;if(yield yield ye.__await(l),--this.count<1)return yield ye.__await(void 0)}}catch(l){n={error:l}}finally{try{a&&!a.done&&(i=s.return)&&(yield ye.__await(i.call(s)))}finally{if(n)throw n.error}}})}*sync(e){if(!(this.count<1)){for(let r of e)if(yield r,--this.count<1)return}}};Ue.TakeTransducer=sn;function Hc(t){return new sn(t)}Ue.take=Hc});var co=k(Ge=>{"use strict";Object.defineProperty(Ge,"__esModule",{value:!0});Ge.takeWhile=Ge.TakeWhileTransducer=void 0;var Be=M(),an=class{constructor(e){this.predicate=e}async_(e){return Be.__asyncGenerator(this,arguments,function*(){var n,i;try{for(var s=Be.__asyncValues(e),a;a=yield Be.__await(s.next()),!a.done;){let l=a.value;if(this.predicate(l))yield yield Be.__await(l);else return yield Be.__await(void 0)}}catch(l){n={error:l}}finally{try{a&&!a.done&&(i=s.return)&&(yield Be.__await(i.call(s)))}finally{if(n)throw n.error}}})}*sync(e){for(let r of e)if(this.predicate(r))yield r;else return}};Ge.TakeWhileTransducer=an;function Lc(t){return new an(t)}Ge.takeWhile=Lc});var uo=k(lo=>{"use strict";Object.defineProperty(lo,"__esModule",{value:!0})});var We=k(de=>{"use strict";Object.defineProperty(de,"__esModule",{value:!0});de.container=de.lazy=de.replace=void 0;function po(t,e,r){return Object.defineProperty(t,e,{value:r})}de.replace=po;function fo(t,e,r){if(typeof r.get=="undefined")throw new Error("@lazy can only decorate getter methods");return Object.defineProperty(t,e,Object.assign(Object.assign({},r),{get(){return po(this,e,r.get.call(this))[e]}}))}de.lazy=fo;function qc(t){return Object.keys(t).reduce((e,r)=>fo(e,r,{configurable:!0,get:()=>t[r](e)}),{})}de.container=qc});var xo=k(Xt=>{"use strict";Object.defineProperty(Xt,"__esModule",{value:!0});Xt.AVLTree=void 0;var mo=M(),Qt=$(),go=We(),Q=class{constructor(e){this.comparator=e}static empty(e=Qt.ascending){return new yo(e)}static create(e,r,n=Qt.ascending){let i=Q.empty(n);return new z(n,e,r,i,i)}static of(e,r=Qt.ascending){return Q.preSorted(e.sort((0,Qt.by)(0)),r,Q.empty(r))}static preSorted(e,r,n){let i=e.length;switch(i){case 0:return n;case 1:{let[[s,a]]=e;return new z(r,s,a,n,n)}default:{let s=Math.floor(i/2),a=Q.preSorted(e.slice(0,s),r,n),l=Q.preSorted(e.slice(s+1),r,n),[u,m]=e[s];return new z(r,u,m,a,l)}}}};Xt.AVLTree=Q;var yo=class extends Q{constructor(e){super(e);this.isEmpty=!0,this.height=0,this.balance=0}insert(e,r){return new z(this.comparator,e,r,this,this)}contains(e){return!1}lookup(e){}delete(e){return{tree:this}}first(){}last(){}removeFirst(){return{tree:this}}removeLast(){return{tree:this}}toString(){return""}*keys(){}*values(){}*entries(){return[]}},z=class extends Q{constructor(e,r,n,i,s){super(e);this.key=r,this.value=n,this.left=i,this.right=s,this.isEmpty=!1}insert(e,r){let n=this.comparator(e,this.key);return n===0?new z(this.comparator,e,r,this.left,this.right):n<0?this.replaceLeft(this.left.insert(e,r)):this.replaceRight(this.right.insert(e,r))}contains(e){let r=this.comparator(e,this.key);return r===0?!0:r<0?this.left.contains(e):this.right.contains(e)}lookup(e){let r=this.comparator(e,this.key);return r===0?this.value:r<0?this.left.lookup(e):this.right.lookup(e)}delete(e){let r=this.comparator(e,this.key);if(r===0){if(this.left.isEmpty)return{tree:this.right,key:this.key,value:this.value};if(this.right.isEmpty)return{tree:this.left,key:this.key,value:this.value};let{tree:a,key:l,value:u}=this.left.removeLast();return{tree:cn(new z(this.comparator,l,u,a,this.right)),key:this.key,value:this.value}}if(r<0){let{tree:a,key:l,value:u}=this.left.delete(e);return{tree:this.replaceLeft(a),key:l,value:u}}let{tree:n,key:i,value:s}=this.right.delete(e);return{tree:this.replaceRight(n),key:i,value:s}}first(){return this.left.isEmpty?this.value:this.left.first()}last(){return this.right.isEmpty?this.value:this.right.last()}removeFirst(){if(this.left.isEmpty)return{tree:this.right,key:this.key,value:this.value};let{tree:e,key:r,value:n}=this.left.removeFirst();return{tree:this.replaceLeft(e),key:r,value:n}}removeLast(){if(this.right.isEmpty)return{tree:this.left,key:this.key,value:this.value};let{tree:e,key:r,value:n}=this.right.removeLast();return{tree:this.replaceRight(e),key:r,value:n}}replaceLeft(e){return cn(new z(this.comparator,this.key,this.value,e,this.right))}replaceRight(e){return cn(new z(this.comparator,this.key,this.value,this.left,e))}toString(){return`(${this.left} ${this.key}=${this.value} ${this.right})`}get balance(){return this.left.height-this.right.height}get height(){return Math.max(this.left.height,this.right.height)+1}*keys(){yield*this.left.keys(),yield this.key,yield*this.right.keys()}*values(){yield*this.left.values(),yield this.value,yield*this.right.values()}*entries(){yield*this.left.entries(),yield[this.key,this.value],yield*this.right.entries()}};mo.__decorate([go.lazy],z.prototype,"balance",null);mo.__decorate([go.lazy],z.prototype,"height",null);function cn(t){let e=t.balance;return e==-2?Uc(t):e==2?jc(t):t}function jc(t){let e=t.left.balance;return e==-1?Bc(t):e==1?ho(t):t}function Uc(t){let e=t.right.balance;return e==1?Gc(t):e==-1?bo(t):t}function ho(t){return So(t)}function Bc(t){let e=vo(t.left);return ho(t.replaceLeft(e))}function bo(t){return vo(t)}function Gc(t){let e=So(t.right);return bo(t.replaceRight(e))}function vo(t){let e=t.right,r=e.left,n=t.replaceRight(r);return e.replaceLeft(n)}function So(t){let e=t.left,r=e.right,n=t.replaceLeft(r);return e.replaceRight(n)}});var ko=k(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.unique=Fe.UniqueTransducer=void 0;var pt=M(),Wc=$(),wo=xo(),ln=class{constructor(e){this.comparator=e}async_(e){return pt.__asyncGenerator(this,arguments,function*(){var n,i;let s=wo.AVLTree.empty(this.comparator);try{for(var a=pt.__asyncValues(e),l;l=yield pt.__await(a.next()),!l.done;){let u=l.value;s.contains(u)||(s=s.insert(u,void 0),yield yield pt.__await(u))}}catch(u){n={error:u}}finally{try{l&&!l.done&&(i=a.return)&&(yield pt.__await(i.call(a)))}finally{if(n)throw n.error}}})}*sync(e){let r=wo.AVLTree.empty(this.comparator);for(let n of e)r.contains(n)||(r=r.insert(n,void 0),yield n)}};Fe.UniqueTransducer=ln;function Fc(t=Wc.ascending){return new ln(t)}Fe.unique=Fc});var Co=k(ze=>{"use strict";Object.defineProperty(ze,"__esModule",{value:!0});ze.WindowedTransducer=ze.windowed=void 0;var Ke=M();function Kc(t,e=1,r=!1){return new dn(t,e,r)}ze.windowed=Kc;var dn=class{constructor(e,r,n){this.size=e,this.step=r,this.remainder=n}async_(e){return Ke.__asyncGenerator(this,arguments,function*(){var n,i;let s=[],a=0;try{for(var l=Ke.__asyncValues(e),u;u=yield Ke.__await(l.next()),!u.done;){let m=u.value;if(a>0){a--;continue}s.push(m),s.length===this.size&&(yield yield Ke.__await([...s]),s=s.slice(this.step),this.step>this.size&&(a=this.step-this.size))}}catch(m){n={error:m}}finally{try{u&&!u.done&&(i=l.return)&&(yield Ke.__await(i.call(l)))}finally{if(n)throw n.error}}this.remainder&&(yield yield Ke.__await([...s]))})}*sync(e){let r=[],n=0;for(let i of e){if(n>0){n--;continue}r.push(i),r.length===this.size&&(yield[...r],r=r.slice(this.step),this.step>this.size&&(n=this.step-this.size))}this.remainder&&(yield[...r])}};ze.WindowedTransducer=dn});var Oo=k(ue=>{"use strict";Object.defineProperty(ue,"__esModule",{value:!0});ue.zipWithIndex=ue.zip=ue.ZipTransducer=void 0;var er=M(),Ao=$(),zc=Jt(),tr=class{constructor(e){this.other=e}async_(e){return er.__asyncGenerator(this,arguments,function*(){if(!(0,Ao.isAsyncIterable)(this.other))throw new Error("Unsupported operation exception");let n=e[Symbol.asyncIterator](),i=this.other[Symbol.asyncIterator]();for(;;){let[s,a]=yield er.__await(Promise.all([n.next(),i.next()]));if(s.done||a.done)return yield er.__await(void 0);yield yield er.__await([s.value,a.value])}})}*sync(e){if(!(0,Ao.isIterable)(this.other))throw new Error("Unsupported operation exception");let r=e[Symbol.iterator](),n=this.other[Symbol.iterator]();for(;;){let i=r.next(),s=n.next();if(i.done||s.done)return;yield[i.value,s.value]}}};ue.ZipTransducer=tr;function Vc(t){return new tr(t)}ue.zip=Vc;function Nc(){return new tr((0,zc.range)(0))}ue.zipWithIndex=Nc});var dt=k(T=>{"use strict";Object.defineProperty(T,"__esModule",{value:!0});var I=M();I.__exportStar(it(),T);I.__exportStar(ji(),T);I.__exportStar(Bi(),T);I.__exportStar(Gi(),T);I.__exportStar(Wi(),T);I.__exportStar(Ft(),T);I.__exportStar(Ki(),T);I.__exportStar(zr(),T);I.__exportStar(zi(),T);I.__exportStar(Ni(),T);I.__exportStar(Jr(),T);I.__exportStar($i(),T);I.__exportStar(Ji(),T);I.__exportStar(Yi(),T);I.__exportStar(Qr(),T);I.__exportStar(to(),T);I.__exportStar(so(),T);I.__exportStar(ao(),T);I.__exportStar(co(),T);I.__exportStar(uo(),T);I.__exportStar(ko(),T);I.__exportStar(Co(),T);I.__exportStar(Oo(),T)});var he=k(Ne=>{"use strict";Object.defineProperty(Ne,"__esModule",{value:!0});Ne.caching=Ne.cache=void 0;function Zc(t,e,r){if(typeof r.value!="function")throw new Error("@cache can only decorate methods");let n=new WeakMap;function i(s){let a=n.get(s);if(a)return a;let l=new Map;return n.set(s,l),l}return Object.defineProperty(t,e,Object.assign(Object.assign({},r),{value:function(...s){let a=JSON.stringify(s),l=i(this),u=l.get(a);if(typeof u!="undefined"||l.has(a))return u;let m=r.value.call(this,...s);return l.set(a,m),m}}))}Ne.cache=Zc;function Qc(t){let e=new Map;return function(...r){let n=JSON.stringify(r),i=e.get(n);if(typeof i!="undefined"||e.has(n))return i;let s=t(...r);return e.set(n,s),s}}Ne.caching=Qc});var Cr=k(Ze=>{"use strict";Object.defineProperty(Ze,"__esModule",{value:!0});Ze.StoppedClock=Ze.SystemClock=void 0;var ta=class{now(){return new Date}};Ze.SystemClock=ta;var ra=class{constructor(e){this.value=e}now(){return this.value}};Ze.StoppedClock=ra});var ai=k(tt=>{"use strict";Object.defineProperty(tt,"__esModule",{value:!0});tt.get=tt.identity=void 0;function Wd(){return t=>t}tt.identity=Wd;function Fd(t,e=void 0){try{let r=t();return typeof r=="undefined"?e:r}catch(r){return e}}tt.get=Fd});var Hr=class{constructor(e){let r=Hr.RFC_3986.exec(e);if(!r)throw new Error(`Invalid Uri: ${e}`);let[,,n,,i,s,,a,,l]=r;this.scheme=n,this.authority=i?new Dr(i):void 0,this.path=s,this.query=a,this.fragment=l}toString(){let e=[];return typeof this.scheme!="undefined"&&e.push(this.scheme,":"),typeof this.authority!="undefined"&&e.push("//",this.authority.toString()),e.push(this.path),typeof this.query!="undefined"&&e.push("?",this.query),typeof this.fragment!="undefined"&&e.push("#",this.fragment),e.join("")}get host(){return this.authority&&this.authority.host}get port(){return this.authority&&this.authority.port}get userInfo(){return this.authority&&this.authority.userInfo}},E=Hr;E.RFC_3986=/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;var Lr=class{constructor(e){let r=Lr.RFC_3986.exec(e);if(!r)throw new Error(`Invalid Authority: ${e}`);let[,n,i,s]=r;this.userInfo=n,this.host=i,this.port=s}toString(){let e=[];return typeof this.userInfo!="undefined"&&e.push(this.userInfo,"@"),typeof this.host!="undefined"&&e.push(this.host),typeof this.port!="undefined"&&e.push(":",this.port),e.join("")}},Dr=Lr;Dr.RFC_3986=/(?:([^@]+)@)?([^:]+)(?::([\d]+))?/;var To=R(dt()),Po=R($()),$c=R(dt());function Jc(t){switch(typeof t){case"undefined":return!0;case"string":return t.trim()==="";case"number":return isNaN(t);case"object":{if(t==null)return!0;if(g.isObject(t))return Object.keys(t).length===0;if(Array.isArray(t))return t.length===0}}return!1}var un=class{static parse(e){if(typeof e!="number"&&X.isEmpty(e))return;let r=Number(e);if(!isNaN(r))return r}static isNumber(e){return typeof e=="number"&&!isNaN(e)}};var Ve=class{static noWhitespace(e){return e&&typeof e=="string"?e.replace(/\s+/g,""):""}static startWith(e,r){return e?e.substring(0,r.length)===r:e===r}static endsWith(e,r){return e.substring(e.length-r.length,e.length)===r}static isEmpty(e){return e===void 0||e===null?!0:e.trim().length===0}static isEmail(e){return typeof e=="string"&&this.validEmailPattern.test(e)}static isLowerCase(e){return e===e.toLowerCase()&&e!==e.toUpperCase()}static isUpperCase(e){return e===e.toUpperCase()&&e!==e.toLowerCase()}static kebabCase(e){return Ve.delimiterCase(e,"-")}static snakeCase(e){return Ve.delimiterCase(e,"_")}static delimiterCase(e,r){return e.replace(/([A-Z][a-z]+|\d+)/gm,`${r}$1`).replace(new RegExp(`^${r}`),"").toLowerCase()}static titleCase(e){return Ve.isEmpty(e)?"":e.replace(/\w\S*/g,r=>r.charAt(0).toUpperCase()+r.substr(1).toLowerCase())}static camelCase(e){return Ve.isEmpty(e)?"":e.replace(/([A-Za-z]+|\d+)/gm,r=>r.charAt(0).toUpperCase()+r.substr(1).toLowerCase()).replace(new RegExp("^."),r=>r.toLowerCase()).replace(new RegExp(/[_\-\s]/g),"")}},X=Ve;X.validEmailPattern=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+$/;function ft(t,e,r){if(e(t))return r(t);switch(typeof t){case"undefined":return;case"object":{if(t===null)return null;if(Array.isArray(t))return t.map(n=>ft(n,e,r));if(g.isObject(t))return g.keys(t).sort().reduce((n,i)=>{let s=t[i];return n[i]=ft(s,e,r),n},{})}}return t}function rr(t,e){switch(typeof t){case"undefined":return;case"object":{if(t===null)return null;if(Array.isArray(t))return t.map(r=>rr(r,e));if(g.isObject(t))return g.keys(t).sort().reduce((r,n)=>{let i=t[n];return r[e(String(n))]=rr(i,e),r},{})}}return t}var g=class{static isObject(e){return e&&typeof e=="object"&&(e.constructor===Object||/Object.*native/.test(e.constructor.toString()))}static keys(e){return Object.keys(e)}static values(e){return Object.keys(e).map(r=>e[r])}static entries(e){return Object.keys(e).map(r=>[r,e[r]])}static removeEmpty(e){return e&&(g.isObject(e)?Object.keys(e).reduce((r,n)=>{let i=g.removeEmpty(e[n]);return Jc(i)||(r[n]=i),r},{}):e)}static sort(e){return e&&(Array.isArray(e)?e.map(g.sort):g.isObject(e)?Object.keys(e).sort().reduce((r,n)=>{let i=e[n];return r[n]=g.sort(i),r},{}):e)}static toLowerCase(e){return typeof e=="string"?e.toLowerCase():Array.isArray(e)?e.map(g.toLowerCase):f(()=>g.isObject(e))?Object.entries(e).reduce((r,[n,i])=>(r[n]=g.toLowerCase(i),r),{}):e}static snakeCase(e){return rr(e,X.snakeCase)}static camelCase(e){return rr(e,X.camelCase)}static filter(e,r){let n=g.keys(e).filter(r);return g.pick(e,...n)}static omit(e,...r){return r.reduce((n,i)=>(Reflect.deleteProperty(n,i),n),e)}static pick(e,...r){return r.reduce((n,i)=>(n[i]=e[i],n),{})}};var C=class{static from(e){return Array.from(e)}static find(e,r){if(e.find)return e.find(r);let[n]=e.filter(r);return n}static findLastIndex(e,r){let n=[...e].reverse().findIndex(r);return n===-1?n:e.length-n-1}static toObject(e){return e.reduce((r,n)=>(Object.keys(n).forEach(i=>{i in r||(r[i]=n[i])}),r),{})}static flatten(e){return e.reduce((r,n)=>r.concat(n),[])}static flatMap(e,r){return e.flatMap?e.flatMap(r):C.flatten(e.map(r))}static unique(e){return Array.from(new Set(e))}static clean(e){return e.filter(Boolean)}static trim(e){return e.map(r=>r.trim())}static includes(e,r){return"includes"in e?e.includes(r):e.indexOf(r)!==-1}static first(e){return e[0]}static last(e){return e[e.length-1]}static safeReverse(e){return e?e.slice().reverse():[]}static shuffle(e){return e.map(r=>({value:r,order:Math.random()})).sort((0,Po.by)("order")).map(({value:r})=>r)}};function f(t,e=void 0){try{let r=t();return typeof r=="undefined"?e:r}catch(r){return e}}function ee(t,e=void 0){return p(this,null,function*(){try{let r=yield t();return typeof r=="undefined"?e:r}catch(r){return e}})}function Yc(t,e){let r=e.toLowerCase(),n=C.find(Object.keys(t),s=>s.toLowerCase()===r);if(!n)return;let i=t[n];return typeof i=="string"?i.trim():i}function nr(t,...e){if(!t)return[];if(Array.isArray(t))return C.clean(C.flatten(t.map(r=>nr(r,...e))));if(typeof t=="object"){let[r,...n]=e,i=Yc(t,r);return typeof i=="object"?nr(i,...n):n.length===0&&Boolean(i)?[i]:[]}return[]}var L=(()=>typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof module!="undefined"?module:Function("return this")())();function Eo(t,e,r){let n=t[e];return typeof n=="undefined"?t[e]=r:Array.isArray(n)?n.indexOf(r)==-1&&n.push(r):t[e]=[n,r],t}function Io(t,e,r,n=i=>i){let i=[],s=0,a;for(;(a=t.exec(e))!=null;)i.push(n(e.substring(s,a.index))),i.push(r(a)),s=t.lastIndex;return i.push(n(e.substring(s))),i.join("")}function Ro(t,e){return t.slice(0,e)}var Mo=R(he()),_o=R(We());function P(t=L){return t.triptease=t.triptease||{},t.triptease.onboard=t.triptease.onboard||{},{triptease:t.triptease,onboard:t.triptease.onboard}}var be;(function(n){n.Native="native",n.NonNative="non-native",n.NotImplemented="not-implemented"})(be||(be={}));function pn(t,e){return f(()=>e.split(".").reduce((r,n)=>r[n],t))}function Do(t){return t==null?be.NotImplemented:typeof t=="function"?t.toString().includes("native code")?be.Native:be.NonNative:be.Native}function Ho(t,...e){return e.reduce((r,n)=>(r[n]=Do(pn(t,n)),r),{})}var ir=class{static exposeApi(){let e=P(L).triptease;e.native||(e.native=ir)}static getProperty(e){let r=pn(L,e);return Do(r)!==be.NonNative?r:pn(ir.window,e)}static get window(){let e=L;if(!e.document)return e;try{let r=e.document,n=r.querySelector("[name='triptease.native']");if(n)return n.contentWindow;let i=r.createElement("iframe");return i.style.display="none",i.setAttribute("title","blank"),i.setAttribute("aria-hidden","true"),i.setAttribute("name","triptease.native"),r.documentElement.appendChild(i),i.contentWindow}catch(r){return e}}},q=ir;O([Mo.cache],q,"getProperty",1),O([_o.lazy],q,"window",1);var Xc=/^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}\.\d{3}Z)?$/;function el(t){return ft(t,e=>typeof e=="string"&&Xc.test(e),e=>{let r=new Date(e);return isNaN(r.valueOf())?e:r})}var tl=q.getProperty("JSON.parse"),Lo=q.getProperty("JSON.stringify"),rl=q.getProperty("Date.prototype.toISOString"),nl=q.getProperty("atob"),il=q.getProperty("btoa"),j=class{static parse(e){return tl(e)}static parseWithDates(e){return el(j.parse(e))}static stringify(e){return Lo(this.clean(e))}static clean(e){return ft(e,r=>{let n=typeof r;switch(n){case"undefined":case"string":case"number":case"boolean":return!0;case"object":{if(r===null)return!0;if(Array.isArray(r)||g.isObject(r))return!1;if("toJSON"in r)return!0}}throw new Error(`Illegal JsonValue: ${n} ${r} `)},r=>r instanceof Date?rl.call(r):r)}static atob(e){try{let r=nl(e);return j.parseWithDates(r)}catch(r){}}static btoa(e){try{if(!g.isObject(e))return;let r=Lo(e);return il(r)}catch(r){}}},_=class{static same(e,r){return j.stringify(e)===j.stringify(r)}static isSuperset(e,r){return e===null||r===null?_.same(e,r):Array.isArray(e)&&Array.isArray(r)?e.length>r.length?!1:e.every(n=>r.some(i=>_.isSuperset(n,i))):f(()=>g.isObject(e))&&f(()=>g.isObject(r))?Object.keys(e).reduce((n,i)=>n&&_.isSuperset(e[i],r[i]),!0):_.same(e,r)}static compress(e){let r=_.groupValues(e);return this.compressGrouped(r)}static compressGrouped(e){return Object.entries(e).reduce(({shared:r,unique:n},[i,s])=>{if(f(()=>g.isObject(s))){let a=_.compressGrouped(s);Object.keys(a.shared).length>0&&(r[i]=a.shared),a.unique.forEach((l,u)=>{n[u]=n[u]||{},Object.keys(l).length>0&&(n[u][i]=l)})}return Array.isArray(s)&&s.forEach((a,l)=>{n[l]=n[l]||{},C.unique(s.map(u=>j.stringify(u))).length===1?r[i]=a:a!==void 0&&(n[l][i]=a)}),{shared:r,unique:n}},{shared:{},unique:[]})}static groupValues(e){let r=Array.from(e.reduce((a,l)=>Object.keys(l).reduce((u,m)=>u.add(m),a),new Set)),[n,i]=e.reduce((a,l)=>r.reduce(([u,m],h)=>{let A=l[h];return f(()=>g.isObject(A))?(m[h]=m[h]||[],m[h].push(A)):(u[h]=u[h]||[],u[h].push(A)),[u,m]},a),[{},{}]),s=Object.entries(i).reduce((a,[l,u])=>(a[l]=_.groupValues(u),a),{});return w(w({},n),s)}static decompress(e){return e.unique.map(r=>this.merge(e.shared,r))}static merge(e,r){return[...Object.keys(e),...Object.keys(r)].reduce((i,s)=>{let a=e[s],l=r[s];return f(()=>g.isObject(a))&&f(()=>g.isObject(l))?i[s]=_.merge(a,l):i[s]=l!=null?l:a,i},{})}};function G(t,e=!0){return t?(t.indexOf("?")==0&&(t=t.substring(1,t.length)),t.split("&").map(function(r){return r.split("=")}).reduce(function(r,n){let i=n[0],s=n[1];if(!i)return r;let a=qo(s),l=e?ol(a):a;return Eo(r,qo(i),l)},{})):{}}function qo(t){return f(()=>decodeURIComponent(t.replace(/\+/g,"%20")),t)}function ol(t){try{return j.parse(t)}catch(e){return t}}function sl(t){return typeof t=="string"?t:JSON.stringify(t)}function jo(t,e=!0){return Object.keys(g.removeEmpty(t)).map(r=>{let n=t[r],i=e?sl(n):n;return`${r}=${encodeURIComponent(i)}`}).join("&")}var Uo=q.getProperty("console.log"),al=q.getProperty("console.error"),cl=q.getProperty("console.debug"),Bo=class{constructor(e=Uo,r=al,n=cl||Uo){this.log=e;this.error=r;this.debug=n}},Go=class{constructor(){this.log=()=>{};this.error=()=>{};this.debug=()=>{}}},or="triptease-debug",ll=256;function sr(t,e=or){let r=f(()=>{var n;return G((n=t.location)==null?void 0:n.search,!1)[e]})||f(()=>{var n;return G(new E((n=t.location)==null?void 0:n.originalHref).query,!1)[e]})||f(()=>{var n,i;return(i=(n=t.process)==null?void 0:n.env)==null?void 0:i.DEBUG})||f(()=>{var n;return((n=t.localStorage)==null?void 0:n.getItem)&&t.localStorage.getItem(e)})||f(()=>{var n;return((n=t.sessionStorage)==null?void 0:n.getItem)&&t.sessionStorage.getItem(e)})||"";return f(()=>r.substring(0,ll),"")}function Wo(t=L){let e=sr(t,or);return X.isEmpty(e)?"":jo({[or]:e})}function dl(t){return sr(t,or).split(",").map(e=>e.trim())}function Fo(t){let e=t.replace(/\./g,"\\.").replace(/\*/g,".*");return new RegExp("^"+e+"$")}function ul(t,e=L){try{let r=dl(e),n=r.filter(i=>i[0]==="!").map(i=>i.substr(1));return n.length>0?!n.some(i=>Fo(i).test(t)):r.some(i=>i==="true"||Fo(i).test(t))}catch(r){return!1}}var ve;(function(n){n[n.DEBUG=0]="DEBUG",n[n.INFO=1]="INFO",n[n.ERROR=2]="ERROR"})(ve||(ve={}));var Ko=class{constructor(e,r,n=new Bo){this.name=e;this.logLevel=r;this.console=n}debug(e,...r){this.logLevel.valueOf()>0||this.console.debug(`[${this.name}] ${e}`,...r)}log(e,...r){this.logLevel.valueOf()>1||this.console.log(`[${this.name}] ${e}`,...r)}error(e,...r){this.logLevel.valueOf()>2||this.console.error(`[${this.name}] ${e}`,...r)}};function y(t,e=L){let r=f(()=>{var n,i,s;return ve[((s=(i=(n=e.process)==null?void 0:n.env)==null?void 0:i.LOG_LEVEL)==null?void 0:s.toUpperCase())||"DEBUG"]},0);return ul(t,e)?new Ko(t,r):new Go}function pl(t){try{let{target:e,method:r}=mn(t.type);if(e&&r)return!0}catch(e){}return!1}var fn=class{constructor(e,r){this.name=e;this.trackingApi=r;this.logger=y(e)}debug(e,...r){this.logger.debug(e,...r)}error(e,...r){this.logger.error(e,...r);try{this.trackingApi.trackError({name:this.name,message:e,args:r.map(n=>mt(n)?yl(n):n)})}catch(n){this.logger.error("Failed to track error",n)}}log(e,...r){this.logger.log(e,...r)}};var J=class{constructor(e,r,n=fl,i=y("messaging")){this.listener=e;this.allowedOrigins=n;this.logger=i;this.target=this.listener!==r?r:void 0}addListener(e){this.listener&&this.listener.addEventListener("message",r=>{this.disallowedOrigin(r)||!pl(r.data)||e(r.data,new J(void 0,r.source||this.target))})}disallowedOrigin(e){return e.origin&&this.allowedOrigins.length>0&&this.allowedOrigins.indexOf(new E(e.origin).host)===-1}send(e){if(this.target)try{this.target.postMessage(e,"*")}catch(r){this.target.postMessage(JSON.parse(JSON.stringify(e)),"*")}}},fl=["onboard.triptease.io","localhost"],ml=/^(.*)\.([^.]+)$/;function mn(t){let[,e,r]=t.match(ml)||[];return{target:e,method:r}}function ar(t){let e={};return function(...r){let n=JSON.stringify(r),i=e[n];return typeof i!="undefined"?i:e[n]=t(...r)}}function gl(t){return t.document.querySelector('iframe[name="triptease.onboard.kernel"]')}function zo(t){let e=gl(t);if(e&&e.contentWindow)return new J(t,e.contentWindow)}function mt(t){return t&&typeof t=="object"&&"name"in t&&typeof t.name=="string"&&"message"in t&&typeof t.message=="string"&&"stack"in t&&typeof t.stack=="string"}function yl(t){return{name:t.name,message:t.message,stack:t.stack}}function gn(t,e,r){return{name:t,message:e,stack:r!=null?r:""}}var ip=new Set(["Unknown","PossibleIdentifier"]),op=new Set(["HotelName","HotelCode","ChainCode"]);var te={cookieBot:"cookieBot",klaro:"klaro",google:"google",defaultNoConsentMode:"defaultNoConsentMode",defaultAutoConsentMode:"defaultAutoConsentMode"};var K;(function(m){m.Search="Search",m.RoomsAndRates="RoomsAndRates",m.Confirmation="Confirmation",m.Checkout="Checkout",m.Payment="Payment",m.Group="Group",m.Advert="Advert",m.Partial="Partial",m.Unknown="Unknown"})(K||(K={}));var sp=[K.Payment,K.Confirmation,K.RoomsAndRates,K.Checkout,K.Search,K.Partial,K.Group,K.Unknown,K.Advert];var Vo;(function(s){s.Room="Room",s.Fee="Fee",s.Tax="Tax",s.CityTax="CityTax",s.Unknown="Unknown"})(Vo||(Vo={}));var No;(function(i){i.ExplicitPage="explicit-page",i.SlipwayConfig="slipway-config",i.InferredPage="inferred-page",i.None="none"})(No||(No={}));var $o;(function(n){n.Singleton="Singleton",n.ApplicationHost="ApplicationHost",n.DataSource="DataSource"})($o||($o={}));var U;(function(i){i.PENDING="Pending",i.SKIPPED="Skipped",i.FAILED="Failed",i.PASSED="Passed"})(U||(U={}));var pe;(function(s){s.SCRIPT_PRESENT="Script Present",s.SCRIPT_LOADED="Script Loaded",s.INTEGRATION_ID_MATCHES="Integration Id Matches",s.PAGE_EVALUATED="Page Evaluated",s.MESSAGING_ACTIVE="Messaging Active"})(pe||(pe={}));var Jo="triptease.onboard.kernel",Yo;(function(i){i.Enabled="Enabled",i.Disabled="Disabled",i.Strict="Strict",i.NotConfigured="NotConfigured"})(Yo||(Yo={}));var re=class{static get(){return f(()=>{let e="9929.151752";return e?"v"+e:"latest"})}};var yn=class{static application(e){let r=Wo();return{name:Jo,url:`https://onboard.triptease.io/kernel/${re.get()}/kernel-host.html?originHost=${e}${r?"&"+r:""}`,type:"iframe",startMessage:"triptease.onboard.kernel-host-started",enabled:!0}}};var hl=q.getProperty("Date"),hn=class{now(){return new hl}},gt=class{now(){return new Date}};function Zo(t){return new Promise(e=>{this.setTimeout(()=>{e()},t)})}var F=class{constructor(e=new gt){this.clock=e;this.delay=Zo.bind(this);this.delay=Zo}task(e){return p(this,null,function*(){return yield this.delay(0),e()})}setTimeout(e,r){return setTimeout(e,r)}clearTimeout(e){clearTimeout(e)}setInterval(e,r){return setInterval(e,r)}clearInterval(e){clearInterval(e)}requestIdleCallback(e,r){let n=r?r.timeout:1,i=this.clock.now().getTime()+n,s=this;return this.setTimeout(()=>{e({didTimeout:!1,timeRemaining(){return Math.max(0,50-(s.clock.now().getTime()-i))}})},n)}cancelIdleCallback(e){this.clearTimeout(e)}};var bp=new F;function Qo(t,e,r=new F){return n=>p(this,null,function*(){let i=yield Promise.race([e(n),r.delay(t)]);return i||{status:504,statusDescription:"Client timeout",body:`Request to ${n.url} timeout after ${t}`}})}function $e(t={credentials:!1}){return e=>p(this,null,function*(){if(typeof fetch!="undefined"){let r=yield fetch(e.url,{method:e.method,headers:e.headers,body:e.body,credentials:t.credentials?"include":"omit"});return{status:r.status,statusDescription:r.statusText,body:yield r.text()}}else{let r=new XMLHttpRequest;return r.open(e.method,e.url,!0),e.headers&&Object.keys(e.headers).forEach(n=>{r.setRequestHeader(n,e.headers[n])}),r.withCredentials=t.credentials,r.send(e.body),new Promise((n,i)=>{r.addEventListener("load",s=>{n({status:r.status,statusDescription:r.statusText,body:r.responseText})}),r.addEventListener("error",s=>{i(s)})})}})}var ts=R(he());function bl(t){return t&&typeof t=="object"&&typeof t.name=="string"&&typeof t.type=="string"&&typeof t.enabled=="boolean"}function Xo(t){return bl(t)&&t.type!=="other"&&typeof t.url=="string"}var vl=/\${([^}]+)}/g;function es(t,e){return Io(vl,t,([,r])=>{var n;return(n=e[r])!=null?n:`\${${r}}`})}var rs=class{constructor(e,r=$e()){this.logger=e;this.httpHandler=r;this.workers={}}createWorker(e,r){return p(this,null,function*(){let n=this.workers[e];return n||(this.workers[e]=yield this.create(r,{name:e}))})}create(e,r){return p(this,null,function*(){try{return new Worker(e,r)}catch(n){this.logger.debug("Failed to create Worker switching to Blob Worker because:",n.message);let i=`location.originalHref = "${e}"; `,a=(yield this.httpHandler({method:"GET",url:e})).body,l=new Blob([i,a],{type:"application/javascript"});return new Worker(URL.createObjectURL(l),r)}})}},cr=class{constructor(e,r=y("application-starter"),n=new rs(r),i=new ns(e,r)){this.window=e;this.logging=r;this.workerFactory=n;this.waiter=i}start(e){return p(this,null,function*(){this.logging.debug(`ApplicationStarter starting app "${e.name}" (${e.type}), ${e.url}`);let r=this.window.document;if(e.type==="worker"){let s=yield this.workerFactory.createWorker(e.name,e.url);return e.startMessage&&(yield this.waiter.waitForMessage(e.startMessage,s)),this.logging.debug("ApplicationStarter returning worker"),s}let n=r.createElement(e.type);n.setAttribute("name",e.name),n.src=es(e.url,{onboard_version:re.get()});let i=cr.DefaultOptions[e.type]||{};return Object.keys(i).forEach(s=>{n.setAttribute(s.toLowerCase(),i[s])}),this.addElement(n),e.startMessage?yield this.waiter.waitForMessage(e.startMessage):e.type==="script"&&(yield this.waiter.waitForLoadEvent(n)),n})}addElement(e){(this.window.document.body||this.window.document.documentElement).appendChild(e)}static create(e){var n;let r=P(e).triptease.onboard;return r.applicationStarter=(n=r.applicationStarter)!=null?n:new cr(e)}},Se=cr;Se.DefaultOptions={script:{defer:"",async:"",crossOrigin:"anonymous"},iframe:{style:"display: none;",sandbox:"allow-scripts allow-same-origin",title:"blank","aria-hidden":"true"}},O([ts.cache],Se.prototype,"start",1);var ns=class{constructor(e,r){this.window=e;this.logging=r}waitForLoadEvent(e){return this.logging.debug("MessageWaiter waiting for load/error event for",e),new Promise((r,n)=>{e.addEventListener("load",r),e.addEventListener("error",i=>n({name:"ScriptError",message:i.message||`Failed to load script "${e.src}"`}))})}waitForMessage(e,r=this.window){return this.logging.debug("MessageWaiter waiting for message",e),new Promise(n=>{this.logging.debug("MessageWaiter creating handler");let i=s=>{try{let a=s.data&&s.data.type,l=a===e;this.logging.debug(`ApplicationStarter message received "${a}", expecting "${e}", matched: ${l}`),l&&(r.removeEventListener("message",i),n(s.data))}catch(a){this.logging.debug("ApplicationStarter error in parsing message",a,s)}};this.logging.debug("MessageWaiter adding listener"),r.addEventListener("message",i)})}};var lr,Sl=new Uint8Array(16);function bn(){if(!lr&&(lr=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!lr))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return lr(Sl)}var is=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function xl(t){return typeof t=="string"&&is.test(t)}var os=xl;var B=[];for(dr=0;dr<256;++dr)B.push((dr+256).toString(16).substr(1));var dr;function wl(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=(B[t[e+0]]+B[t[e+1]]+B[t[e+2]]+B[t[e+3]]+"-"+B[t[e+4]]+B[t[e+5]]+"-"+B[t[e+6]]+B[t[e+7]]+"-"+B[t[e+8]]+B[t[e+9]]+"-"+B[t[e+10]]+B[t[e+11]]+B[t[e+12]]+B[t[e+13]]+B[t[e+14]]+B[t[e+15]]).toLowerCase();if(!os(r))throw TypeError("Stringified UUID is invalid");return r}var ss=wl;function kl(t,e,r){t=t||{};var n=t.random||(t.rng||bn)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){r=r||0;for(var i=0;i<16;++i)e[r+i]=n[i];return e}return ss(n)}var vn=kl;var yt=()=>f(()=>crypto.randomUUID())||vn(),Sn=class{generate(e){if(typeof e!="undefined")throw new Error("UuidGenerator does not support custom lengths");return yt().replace(/-/g,"")}};var as=class{constructor(e,r){this.messaging=e;this.idGenerator=r}get(e,r,n){return(...i)=>p(this,null,function*(){let s=this.idGenerator.generate(),{payload:a}=yield this.messaging.handle({type:"triptease.onboard.request",requestType:String(r),payload:i,correlationId:s});if(mt(a))throw a;return a})}};function ne(t,e=new Sn){return new Proxy({},new as(t,e))}var xn=class{constructor(e,r=ne(e)){this.proxy=r;this.applicationConfig=ar(e=>p(this,null,function*(){return yield this.proxy.applicationConfig(e)}));this.generateClientConfig=ar(e=>p(this,null,function*(){return yield this.proxy.generateClientConfig(e)}));this.generateConfig=ar(e=>p(this,null,function*(){return yield this.proxy.generateConfig(e)}))}};var Je=class{constructor(e){this.window=e;this.scripts=new Set}static create(e){let r=P(e).onboard,n=r.stackScriptFinder;return n||(r.stackScriptFinder=new Je(e))}capture(){let e=Al();e&&this.scripts.add(e);let r=this.window.document.currentScript;r&&"src"in r&&this.scripts.add(r.src)}get(){return Array.from(this.scripts).map(e=>new E(e))}},Cl=/(https?.*):\d+:\d+/;function Al(){try{throw new Error}catch(t){if(!t.stack)return;let e=t.stack.match(Cl);return e?e[1]:void 0}}function cs(t){let e=Je.create(t);e.capture();let r=e.get();return g.removeEmpty({scripts:r.map(n=>n.toString()),domains:r.map(n=>n.host).filter(Boolean),paths:r.map(n=>n.path)})}function ls({method:t="POST",url:e,body:r}){let n=j.stringify(r);if(typeof navigator.sendBeacon!="undefined"&&t==="POST")navigator.sendBeacon(e,n);else if(typeof fetch!="undefined")fetch(e,{method:t,body:n});else if(XMLHttpRequest){let i=new XMLHttpRequest;i.open(t,e,!0),i.send(n)}}var ht={name:"onboard",version:re.get()},Ol="https://onboard.triptease.io";var wn=class{constructor(e,r,n=y("analytics"),i=50){this.window=e;this.clock=r;this.logger=n;this.batchSize=i;this.queued=[];this.interval=setInterval(()=>p(this,null,function*(){return yield this.flush()}),1e3),this.window.addEventListener("pagehide",()=>p(this,null,function*(){return yield this.flush()}))}stop(){clearInterval(this.interval)}send(e){return p(this,null,function*(){this.queued.push(Tl(this.clock,e)),this.queued.length>this.batchSize&&(yield this.flush())})}flush(){return p(this,null,function*(){if(this.queued.length===0)return;let e=this.queued.splice(0,this.batchSize);this.logger.log(`Flushing batch of ${e.length}, remaining in queue ${this.queued.length}`);let r={type:"triptease.onboard.batch",sentAt:this.clock.now(),payload:e};ls({url:`${Ol}/message/batch`,body:r})})}};function Tl(t,e){return w({messageId:yt(),createdAt:t.now()},e)}var Ds=R(We());function Pl(t){return t&&typeof t=="function"&&typeof t.getAll=="function"}function ds(n,i){return p(this,arguments,function*(t,e,r=new F){let s=t[t.GoogleAnalyticsObject||"ga"];return Pl(s)?ee(()=>p(this,null,function*(){let a=new Promise(l=>s(()=>l(C.unique(s.getAll().map(u=>u.get(e))))));return yield Promise.race([a,r.delay(50).then(()=>[])])})):[]})}function us(t){return p(this,null,function*(){return{trackingIds:yield ds(t,"trackingId"),clientIds:yield ds(t,"clientId")}})}function ps(t){return{containerIds:C.unique(Array.from(t.document.querySelectorAll("script[src*=googletagmanager]")).map(r=>{let{query:n}=new E(r.src),{id:i}=G(n);return i}))}}function fs(t){let e=Object.fromEntries(t.document.cookie.split(";").map(r=>r.split("=").map(n=>n.trim())));return g.removeEmpty({fbp:e._fbp,fbc:e._fbc})}function ms(t){return{appId:f(()=>t.duetto.initialConfig.appId),tld:f(()=>t.duetto.initialConfig.tld)}}function gs(t){var n;let e=!!t.document.querySelector("script[src*=revinate], .revinate-form, #revinate_contact_api_form"),r=(n=t.document.querySelector("#revinate_contact_api_form"))==null?void 0:n.getAttribute("token");if(e)return{exists:e,contactApiFormToken:r}}function ys(t){return g.removeEmpty({accountKey:f(()=>t.thn.__init.account_key),productAccess:f(()=>t.thn.__init.product_access)})}function hs(t){let e=t.document.querySelector("#hv[data-hvhotelid], #hv[data-hvexthotelid]");if(e)return g.removeEmpty({hotelId:e.dataset.hvhotelid,extHotelId:e.dataset.hvexthotelid,clientId:e.dataset.hvclientid,language:e.dataset.hvlanguage,product:e.dataset.hvproduct})}var bs="triptease.onboard.response";function kn(t){return t&&typeof t=="object"&&t.type==="triptease.onboard.request"&&typeof t.requestType=="string"&&typeof t.correlationId=="string"&&Array.isArray(t.payload)}function ur(t){return t&&typeof t=="object"&&t.type==="triptease.onboard.response"&&typeof t.correlationId=="string"}function pr(t,e){return{type:"triptease.onboard.response",correlationId:t,payload:e}}function fr(t,e){return pr(t,gn("NotFound","No handler found for "+e))}function vs(t){return f(()=>t.payload.name==="NotFound",!1)}function Ss(t,e){return pr(t,gn(e.name,e.message,e.stack))}var bt=class{constructor(e,r=60*1e3,n=new F){this.handler=e;this.timeout=r;this.timers=n}handle(e){return p(this,null,function*(){let r=yield Promise.race([this.handler.handle(e),this.timers.delay(this.timeout)]);return r||{type:bs,payload:new Error(`Request ${e.requestType} timed out after ${this.timeout}`),correlationId:e.correlationId}})}};var xs=y("messaging"),fe=class{constructor(e){this.messageHandler=e;this.promises=new Map;e&&e.addListener(r=>{if(ur(r)){let{correlationId:n}=r,i=this.promises.get(n);i&&(xs.debug("Sender matched response",r),i.resolve(r),this.promises.delete(n))}})}handle(e){return p(this,null,function*(){return xs.debug("Sending request",e),this.messageHandler&&this.messageHandler.send(e),new Promise((r,n)=>{this.promises.set(e.correlationId,{resolve:r,reject:n})})})}};function ws(t){return p(this,null,function*(){return{browsingTopics:yield ee(()=>Il(t)),attributionSrc:C.unique(Array.from(t.document.querySelectorAll("a[attributionSrc], img[attributionSrc], script[attributionSrc]")).map(e=>e.getAttribute("attributionSrc"))),attributionSourceId:C.unique(Array.from(t.document.querySelectorAll("a[attributionSourceId]")).map(e=>e.getAttribute("attributionSourceId"))),attributionDestination:C.unique(Array.from(t.document.querySelectorAll("a[attributionDestination]")).map(e=>e.getAttribute("attributionDestination")))}})}function El(t){return ne(new bt(new fe(zo(t)),50))}var Il=t=>p(void 0,null,function*(){return El(t).browserTopics()});function ks(t){return p(this,null,function*(){return g.removeEmpty({googleAnalytics:yield ee(()=>us(t),{}),googleTagManager:f(()=>ps(t),{}),facebook:f(()=>fs(t),{}),duetto:ms(t),revinate:gs(t),thn:ys(t),hotelVerse:hs(t),adtech:yield ee(()=>ws(t))})})}var Cs=["page","referrer","redirectSource","redirectDestination","source"];function As(t){return!!t.trackingId}function Y(t){if(!t)return{};let{scheme:e,host:r,path:n,query:i,fragment:s}=new E(t);return g.removeEmpty({scheme:e,host:r,path:n,query:i,queryParsed:G(i,!1),fragment:s})}var mr;(function(v){v.Config="triptease.config",v.Event="triptease.event",v.Log="triptease.logs",v.Error="triptease.onboard.error",v.Message="triptease.onboard.message",v.PageDisplayedSearch="triptease.integration.page_displayed_search",v.PageDisplayedRoomsAndRates="triptease.integration.page_displayed_rooms-and-rates",v.PageDisplayedConfirmation="triptease.integration.page_displayed_confirmation",v.PageDisplayedCheckout="triptease.integration.page_displayed_checkout",v.PageDisplayedUnknown="triptease.integration.page_displayed_unknown",v.PageDisplayedGroup="triptease.integration.page_displayed_group",v.PageDisplayedPartial="triptease.integration.page_displayed_partial",v.PageErroredRoomsAndRates="triptease.integration.page_errored_rooms-and-rates",v.PageErroredConfirmation="triptease.integration.page_errored_confirmation",v.IntegrationData="triptease.integration.integration_data",v.PartialConfirmationPageData="triptease.integration.partial_confirmation_data",v.InvalidConfirmationData="triptease.integration.invalid_confirmation_data",v.InvalidPage="triptease.integration.invalid_page",v.GenericScript="triptease.integration.generic_script",v.DataCapture="triptease.integration.data_capture",v.GenericAnalysisConfirmation="triptease.integration.generic_analysis_confirmation",v.EntityUpdate="triptease.entity.update",v.StatusChanged="triptease.onboard.status-changed"})(mr||(mr={}));var me;(function(b){b.PageDisplayedAdvert="page_displayed_advert",b.PageDisplayedEmail="page_displayed_email",b.PageDisplayedMessage="page_displayed_message",b.UserClickedAdvert="user_clicked_advert",b.UserClickedEmailCTA="user_clicked_email-cta",b.UserClickedMessageClose="user_clicked_message-close",b.UserClickedMessageCTA="user_clicked_message-cta",b.UserSubmittedPII="user_submitted_pii",b.UserClickedBookingEngineLink="user_clicked_booking-engine-link",b.UserClickedEmailAddress="user_clicked_email-address",b.UserClickedLink="user_clicked_link",b.UserClickedOutboundLink="user_clicked_outbound-link",b.UserClickedPhoneNumber="user_clicked_phone-number"})(me||(me={}));var Rl=[me.UserClickedBookingEngineLink,me.UserClickedEmailAddress,me.UserClickedLink,me.UserClickedOutboundLink,me.UserClickedPhoneNumber];function Ml(t){var e,r,n;return!!((n=(r=(e=t==null?void 0:t.context)==null?void 0:e.app)==null?void 0:r.name)==null?void 0:n.startsWith("MessageEngine"))}function Os(t){var e,r;try{if(Ml(t))return{channel:"Messages",provider:"Triptease"};if(Rl.includes(t.event))return{channel:"Direct",provider:"Unknown"};let{eventCounter:n,trafficSource:i}=(r=(e=t==null?void 0:t.context)==null?void 0:e.tab)!=null?r:{};if(n===1)return{channel:i==null?void 0:i.channel,provider:i==null?void 0:i.provider}}catch(n){}return{channel:"Unknown",provider:"Unknown"}}var ie=R(We());var Is=R(he());var Cn=["tt_gha_campaign_id","tt_gsource"],Ts=["utm_campaign","utm_content","utm_medium","utm_source","utm_term","tt_ad_type","tt_auid","tt_channel","tt_cid","tt_clsrc","tt_meta","tt_pmd","tt_ps_tid","tt_rt","dclid","fbclid","gbraid ","gclid","gclsrc","msclkid","wbraid","wh_token",...Cn];function An(t,e,r){var u,m;let{queryParsed:n,fragment:i}=Y(t),s=i?G((u=i.split("?")[1])!=null?u:i,!1):{},a=(m=j.atob(n==null?void 0:n.data))!=null?m:{},l=w(w(w({},s),n),a==null?void 0:a.payload);return g.removeEmpty(r.reduce((h,A)=>{let S=l[A];if(!S)return h;let b=Array.isArray(S)?S.filter(Boolean)[0]:S;if(b.includes("?")&&b.includes("="))return An(b,h,r);if(b.includes("&")&&b.includes("=")){let[se,H]=b.split(/&(.*)/);return h[A]=se,An(`?${H}`,h,r)}return h[A]=b,h},e))}function gr(t,e){return typeof t!="string"?{}:_l(An(t,{},e))}function Ps(t){return gr(t,Ts)}function _l(t){var e,r;return g.removeEmpty(w(D(w({},t),{tt_cid:(e=t.tt_cid)!=null?e:t.tt_gha_campaign_id,tt_clsrc:(r=t.tt_clsrc)!=null?r:t.tt_gsource}),Cn.reduce((n,i)=>D(w({},n),{[i]:void 0}),{})))}function Es(t){return t.filter(Boolean).reverse().reduce((r,n)=>_.merge(r,n),{})}var Dl=new Map([["facebook","Facebook"],["facebook.com","Facebook"],["fb","Facebook"],["ig","Instagram"],["instagram","Instagram"],["line","Line"],["linkedin","LinkedIn"],["pinterest","Pinterest"],["reddit","Reddit"],["snapchat","SnapChat"],["tiktok","TikTok"],["tripadvisor","TripAdvisor"],["tripadvisor.com","TripAdvisor"],["twitter","Twitter"],["twitter.com","Twitter"],["wechat","WeChat"],["yelp","Yelp"],["zalo","Zalo"]]),Hl=new Map([["facebook","Facebook"],["instagram","Instagram"],["twitter","Twitter"],["snapchat","SnapChat"]]),Rs=new Map([["baidu","Baidu"],["bing","Bing"],["duckduckgo","DuckDuckGo"],["google","Google"],["google.com","Google"],["googlemybusiness","Google"],["gha","Google"],["kayak","Kayak"],["msn","MSN"],["naver","Naver"],["rakuten","Rakuten"],["seznam","Seznam"],["skyscanner","SkyScanner"],["trivago","Trivago"],["wego","Wego"],["yahoo","Yahoo"],["yandex","Yandex"]]),Ll=new Set(["display","banner","expandable","interstitial","cpm"]),ql=/^(.*cp.*|ppc|paid.*)$/,jl=/^social[-_ ]?(?:network|media)?$/,Ms=/^e[-_\s]?mail$/;function _s(t){return/metai.*o/.test(t)}function Ul(t,e,r,n,i){return t&&i!=="tfsa"?!0:/google.*hpa/.test(e)&&_s(r)&&n}function Bl(t,e){return!!t||e==="display"}function Gl(t,e){return t==="paidsearch"||e==="tfsa"}function Wl(t){return t==="paidsocial"}function Fl(t){return!!(t==null?void 0:t.startsWith("email"))}function Kl(t){return t==="messages"}var V=class{constructor(e){this.wihpDomains=new Set(["secure-hotel-tracker.com","secure-relay.com"]);this.dEdgeDomains=["redir.book-secure.com",".official-rates.com"];this.travelclickDomains=["tcgms.net","travelclick.com","zmaildirect.com"];this.cendynDomains=["guestfolio.net","contact-client.com"];this.history=e.map(r=>g.removeEmpty(D(w({},r),{urlParsed:Y(r.url),wellKnownParams:Ps(r.url)}))),this.wellKnownParams=Es(this.history.map(r=>r.wellKnownParams))}get referrer(){var e;return Y((e=this.history.find(r=>r.urlSource==="referrer"))==null?void 0:e.url)}get page(){var e;return Y((e=this.history.find(r=>r.urlSource==="page"))==null?void 0:e.url)}getParameter(e){let r=this.wellKnownParams[e];return f(()=>r.toLowerCase().trim())}get linkType(){var r;let e=(r=this.getParameter("tt_ad_type"))==null?void 0:r.toLowerCase();return e==="paid"?"Paid":e==="free"?"Free":ql.test(this.getParameter("utm_medium"))?"Paid":"Unknown"}get searchEngine(){var s;let e=this.getParameter("utm_source"),r=this.getParameter("tt_meta"),[,n]=(s=Array.from(Rs.entries()).find(([a])=>(e==null?void 0:e.startsWith(a))||(r==null?void 0:r.startsWith(a))))!=null?s:[];if(n)return n;let[i]=f(()=>this.referrer.host.split(".").flatMap(a=>[Rs.get(a)].filter(Boolean)),[]);return i||"Unknown"}get social(){let e=Dl.get(this.getParameter("utm_source"));if(e)return e;let[r="Unknown"]=f(()=>this.referrer.host.split(".").flatMap(n=>[Hl.get(n)].filter(Boolean)),[]);return r}get tripteaseChannels(){let e=this.getParameter("utm_source"),r=this.getParameter("utm_campaign"),n=this.getParameter("tt_meta"),i=this.getParameter("tt_rt"),s=this.getParameter("tt_channel"),a=this.getParameter("tt_clsrc"),l=!!this.history.find(u=>["redirectSource","redirectDestination"].includes(u.urlSource));if(Ul(n,e,r,l,a))return{channel:"Metasearch",provider:"Triptease",adType:this.linkType};if(Bl(i,s))return{channel:"Display",provider:"Triptease",adType:"Retargeting"};if(Gl(s,a))return{channel:"Paid Search",provider:"Triptease",adType:"Unknown"};if(Wl(s))return{channel:"Paid Social",provider:"Triptease",adType:"Unknown"};if(Fl(s))return{channel:"Email",provider:"Triptease",adType:"Unknown"};if(Kl(s))return{channel:"Messages",provider:"Triptease",adType:"Unknown"}}get thirdPartyChannels(){var s;let e=((s=this.referrer)==null?void 0:s.host)||"",r=this.getParameter("utm_campaign"),n=this.getParameter("utm_source"),i=this.getParameter("utm_medium");if(this.wihpDomains.has(e)||_s(r))return{channel:"Metasearch",provider:"WIHP",adType:this.linkType};if(this.dEdgeDomains.some(a=>e.endsWith(a)))return{channel:this.channel,provider:"D-Edge",adType:this.linkType};if(this.travelclickDomains.some(a=>e.endsWith(a))&&e!==this.page.host)return{channel:this.channel,provider:"Travelclick",adType:this.linkType};if((e==null?void 0:e.endsWith("revinate.com"))||n==="revinate")return{channel:this.channel,provider:"Revinate",adType:this.linkType};if(this.cendynDomains.some(a=>e.endsWith(a))||n==="cendyn")return{channel:this.channel,provider:"Cendyn",adType:this.linkType};if(i==="channel_connect")return{channel:this.channel,provider:"Sabre",adType:this.linkType}}get channel(){let e=this.getParameter("utm_source"),r=this.getParameter("utm_medium");return e==="direct"||!r&&!e?"Direct":Ll.has(r)?"Display":Ms.test(e)||Ms.test(r)?"Email":this.searchEngine!=="Unknown"?this.linkType==="Paid"?"Paid Search":"Organic Search":this.social!=="Unknown"?this.linkType?"Paid Social":"Organic Social":jl.test(r)?"Organic Social":"Unknown"}standardChannels(){return{channel:this.channel,provider:"Unknown",adType:"Unknown"}}get trafficSource(){var r,n;let e=(n=(r=this.tripteaseChannels)!=null?r:this.thirdPartyChannels)!=null?n:this.standardChannels();return D(w({},e),{social:this.social,searchEngine:this.searchEngine})}};O([ie.lazy],V.prototype,"referrer",1),O([ie.lazy],V.prototype,"page",1),O([Is.cache],V.prototype,"getParameter",1),O([ie.lazy],V.prototype,"linkType",1),O([ie.lazy],V.prototype,"searchEngine",1),O([ie.lazy],V.prototype,"social",1),O([ie.lazy],V.prototype,"tripteaseChannels",1),O([ie.lazy],V.prototype,"channel",1),O([ie.lazy],V.prototype,"trafficSource",1);function zl(t){return{title:t.document.title,locale:t.document.documentElement.lang||t.document.documentElement.getAttribute("xml:lang")||"",url:t.location.href,urlParsed:Y(t.location.href),referrer:t.document.referrer,referrerParsed:Y(t.document.referrer),characterSet:t.document.characterSet,opener:f(()=>Boolean(t.opener),!1)}}function Vl(t){var e;return(e=t.find(r=>As(r)))==null?void 0:e.trackingId}var Nl=["en","es","pt","de","fr","sv","it","zh","nl","ja"];function $l(){return f(()=>Intl.DateTimeFormat.supportedLocalesOf(Nl),[])}var On=class{constructor(e,r,n){this.browserMessageBuilder=e;this.sessionTracker=r;this.identityCombiner=n}buildMessage(e){return p(this,null,function*(){var l;let r=yield this.browserMessageBuilder.buildMessage(e),n=yield this.identityCombiner.getIdentity(),i=yield this.sessionTracker.urls((l=r.payload)==null?void 0:l.apiKey,n.serverTime),s=new V(i),a=g.removeEmpty(_.merge(D(w({},D(w({},n),{serverTime:void 0})),{trackingId:Vl(i),context:{page:{urls:s.history},tab:{history:s.history,wellKnownParams:s.wellKnownParams,trafficSource:s.trafficSource},trafficSource:s.trafficSource}}),r));return g.removeEmpty(_.merge({context:{eventSource:Os(a)}},a))})}},yr=class{constructor(e,r=new gt){this.window=e;this.clock=r}get timezone(){return f(()=>Intl.DateTimeFormat().resolvedOptions().timeZone,"")}buildMessage(e){return p(this,null,function*(){let r=this.clock.now(),n=zl(this.window);return g.removeEmpty(_.merge({createdAt:r,messageId:yt(),context:{library:ht,userAgent:this.window.navigator.userAgent,locale:this.window.navigator.language,page:n,screen:{width:this.window.screen.width,height:this.window.screen.height},timezone:this.timezone,thirdParty:yield ks(this.window),scripts:cs(this.window),features:D(w({},Ho(this.window,...Jl)),{supportedLocales:$l()}),performance:f(()=>PerformanceObserver.supportedEntryTypes,[])}},e))})}};O([Ds.lazy],yr.prototype,"timezone",1);var Jl=["fbq","fetch","Set","Map","WebAssembly.constructor","PerformanceObserver","Date","Date.now","Date.prototype.toISOString","Date.prototype.toJSON","Date.prototype.getTime","crypto.randomUUID","crypto.getRandomValues","crypto.subtle.digest","Intl.Collator","Intl.NumberFormat","Intl.NumberFormat.prototype.formatToParts","Intl.DateTimeFormat","Intl.DateTimeFormat.prototype.formatToParts","console.log","navigator.share","navigator.serviceWorker","EventSource","customElements","__tcfapi","__cmp","_etmc","IntersectionObserver","IntersectionObserverEntry","IntersectionObserverEntry.prototype.intersectionRatio","document.browsingTopics","navigator.joinAdInterestGroup","navigator.runAdAuction","navigator.adAuctionComponents","navigator.createAuctionNonce","HTMLFencedFrameElement","Translator","LanguageDetector","Summarizer","LanguageModel"];var Yl=y("messaging"),hr=class{constructor(){this.handlers=new Map}register(e,r){return e.forEach(n=>{if(this.hasHandlerFor(n))throw new Error(`Method name "${n}" already registered to a handler`);this.handlers.set(n,r)}),this}handle(e){return p(this,null,function*(){let r=this.handlers.get(e.requestType);return r?(Yl.debug("Matched message to handler",e,r),yield r.handle(e)):fr(e.correlationId,e.requestType)})}hasHandlerFor(e){return this.handlers.has(e)}};var Tn=y("messaging"),Ye=class{constructor(e){this.target=e}handle(e){return p(this,null,function*(){let r=this.target[e.requestType];if(!r)return Tn.debug("No method found that matches method",e.requestType,this.target),fr(e.correlationId,e.requestType);try{Tn.debug("Found method",e.requestType);let n=yield r.apply(this.target,e.payload);return pr(e.correlationId,n)}catch(n){return Tn.debug("Error trying to in invoke method",e.requestType,n),Ss(e.correlationId,n)}})}};var Zl=re.get();function Ql(t){return`https://onboard.triptease.io/integrations/${Zl}/${t}.js`}function Pn(t){return typeof t!="string"?"":t.split(/[^A-Za-z0-9-]/)[0].replace(/-/g,"").toLowerCase()}var d;(function(i){i.Standard="Standard",i.Custom="Custom",i.Marketing="Marketing",i.Internal="Internal"})(d||(d={}));var c=class{constructor(e,r){this.name=e;this.type=r;if(!/[A-Za-z0-9]/.test(e))throw new Error("Only alpha numeric allowed");c.Lookup.set(Pn(e),this)}static values(){return Array.from(c.Lookup.values())}static parse(e){let r=c.Lookup.get(Pn(e));if(!r)throw new Error(`Invalid booking engine name: ${e}`);return r}toString(){return this.name}get canonical(){return Pn(this.name)}get folder(){return this.isSelfIntegration()?c.Default.folder:X.kebabCase(this.name)}get script(){return Ql(this.folder)}isSelfIntegration(){return c.SelfIntegration.has(this)}},o=c;o.Lookup=new Map,o.AboveProperty=new c("AboveProperty",d.Standard),o.AfricaAlbida=new c("AfricaAlbida",d.Custom),o.Alaric=new c("Alaric",d.Standard),o.Ascott=new c("Ascott",d.Custom),o.ASIWebRes=new c("ASIWebRes",d.Standard),o.AtlantisORS=new c("AtlantisORS",d.Standard),o.Auberge=new c("Auberge",d.Marketing),o.AvailPro=new c("AvailPro",d.Standard),o.Avvio=new c("Avvio",d.Standard),o.Ayana=new c("Ayana",d.Custom),o.AZDS=new c("AZDS",d.Standard),o.BanyanTree=new c("BanyanTree",d.Marketing),o.BestWesternFrance=new c("BestWesternFrance",d.Custom),o.BestWesternItaly=new c("BestWesternItaly",d.Custom),o.BestWesternUk=new c("BestWesternUk",d.Custom),o.Betsy=new c("Betsy",d.Custom),o.Bloom=new c("Bloom",d.Custom),o.BookAssist=new c("BookAssist",d.Standard),o.BookEasy=new c("BookEasy",d.Standard),o.Bookolo=new c("Bookolo",d.Standard),o.BookOnlineNow=new c("BookOnlineNow",d.Standard),o.BookVisit=new c("BookVisit",d.Standard),o.Booking=new c("Booking"),o.Booking2Hotels=new c("Booking2Hotels",d.Standard),o.BookingExpert=new c("BookingExpert",d.Standard),o.BrochnerHotels=new c("BrochnerHotels",d.Custom),o.BusyRooms=new c("BusyRooms",d.Standard),o.BWHHotelGroup=new c("BWHHotelGroup",d.Custom),o.CenterHotels=new c("CenterHotels",d.Custom),o.CityExpress=new c("CityExpress"),o.Clink=new c("Clink",d.Custom),o.Clock=new c("Clock",d.Standard),o.CloudBeds=new c("CloudBeds",d.Standard),o.Cocotel=new c("Cocotel",d.Custom),o.CompuRez=new c("CompuRez",d.Standard),o.Comwell=new c("Comwell"),o.ConstanceHotels=new c("ConstanceHotels",d.Custom),o.Default=new c("Default",d.Internal),o.DerqueBooking=new c("DerqueBooking"),o.DeutscheHospitality=new c("DeutscheHospitality"),o.Dingus=new c("Dingus",d.Standard),o.Dirs21=new c("Dirs21",d.Standard),o.DoyleCollection=new c("DoyleCollection",d.Custom),o.EasyBooking=new c("EasyBooking"),o.EasyConsulting=new c("EasyConsulting"),o.Erez=new c("Erez",d.Standard),o.EGds=new c("EGds",d.Standard),o.Evancy=new c("Evancy",d.Custom),o.Exely=new c("Exely",d.Standard),o.Everly=new c("Everly",d.Custom),o.Eviivo=new c("Eviivo",d.Standard),o.ExtendedStayAmerica=new c("ExtendedStayAmerica",d.Custom),o.Ezee=new c("Ezee",d.Standard),o.FastBooking=new c("FastBooking",d.Standard),o.Firmdale=new c("Firmdale",d.Custom),o.FourSeasons=new c("FourSeasons",d.Custom),o.FrontDeskMaster=new c("FrontDeskMaster",d.Standard),o.FullertonHotels=new c("FullertonHotels",d.Custom),o.Furama=new c("Furama",d.Custom),o.GemHotels=new c("GemHotels",d.Custom),o.Generic=new c("Generic",d.Internal),o.GHS=new c("GHS",d.Standard),o.GlenEagles=new c("GlenEagles"),o.GuestCentric=new c("GuestCentric",d.Standard),o.GuestDesk=new c("GuestDesk",d.Standard),o.GuestLine=new c("GuestLine",d.Standard),o.GuestPro=new c("GuestPro",d.Standard),o.GuestRez=new c("GuestRez"),o.Guild=new c("Guild"),o.HamiltonIsland=new c("HamiltonIsland",d.Custom),o.HamiltonIslandHolidayHomes=new c("HamiltonIslandHolidayHomes",d.Custom),o.HandPickedHotels=new c("HandPickedHotels",d.Custom),o.Hart=new c("Hart",d.Standard),o.HHotels=new c("HHotels",d.Custom),o.HighLevelSoftware=new c("HighLevelSoftware",d.Standard),o.Hipotels=new c("Hipotels",d.Custom),o.HiUsa=new c("HiUsa",d.Custom),o.HotelChamp=new c("HotelChamp",d.Standard),o.Hoteliers=new c("Hoteliers",d.Standard),o.HoteliersGuru=new c("HoteliersGuru",d.Standard),o.HotelKeyApp=new c("HotelKeyApp",d.Standard),o.HotelNetSolutions=new c("HotelNetSolutions",d.Standard),o.HotelPartner=new c("HotelPartner",d.Standard),o.Hotetec=new c("Hotetec",d.Standard),o.Hotusa=new c("Hotusa",d.Standard),o.Hoxton=new c("Hoxton",d.Custom),o.HspRez=new c("HspRez",d.Standard),o.HtiSystems=new c("HtiSystems",d.Standard),o.Hyatt=new c("Hyatt",d.Custom),o.Iberostar=new c("Iberostar",d.Custom),o.Infotera=new c("Infotera",d.Standard),o.Inkaterra=new c("Inkaterra",d.Custom),o.InnQuest=new c("InnQuest",d.Standard),o.InnRoad=new c("InnRoad",d.Standard),o.InnStyle=new c("InnStyle"),o.Inntopia=new c("Inntopia",d.Standard),o.Iperbooking=new c("Iperbooking"),o.IRM=new c("IRM",d.Standard),o.JazHotels=new c("JazHotels",d.Custom),o.Journey=new c("Journey",d.Standard),o.JustBestBooking=new c("JustBestBooking",d.Standard),o.Kasa=new c("Kasa",d.Custom),o.KeaHotels=new c("KeaHotels",d.Custom),o.Kempinski=new c("Kempinski"),o.Kerzner=new c("Kerzner",d.Custom),o.LatourHotelsAndResorts=new c("LatourHotelsAndResorts",d.Custom),o.LHW=new c("LHW",d.Custom),o.LifeHouse=new c("LifeHouse",d.Custom),o.Loews=new c("Loews",d.Custom),o.Lotte=new c("Lotte",d.Custom),o.LumaHotels=new c("LumaHotels",d.Custom),o.Luxscapia=new c("Luxscapia",d.Standard),o.McDreams=new c("McDreams",d.Custom),o.Mews=new c("Mews",d.Standard),o.MgmResorts=new c("MgmResorts",d.Custom),o.MillenniumHotels=new c("MillenniumHotels",d.Custom),o.MinorHotels=new c("MinorHotels",d.Standard),o.Mirai=new c("Mirai",d.Standard),o.MotelOne=new c("MotelOne",d.Custom),o.Namastay=new c("Namastay",d.Standard),o.NativePlaces=new c("NativePlaces"),o.NeoBookings=new c("NeoBookings",d.Standard),o.NetAffinity=new c("NetAffinity",d.Standard),o.Newbook=new c("Newbook",d.Standard),o.NHHotels=new c("NHHotels"),o.Nightsbridge=new c("Nightsbridge",d.Standard),o.OKU=new c("OKU",d.Custom),o.OmegaHotelManagement=new c("OmegaHotelManagement",d.Custom),o.Omnibees=new c("Omnibees",d.Standard),o.OneHotels=new c("OneHotels",d.Standard),o.Opera=new c("Opera",d.Standard),o.OpenHotel=new c("OpenHotel",d.Standard),o.P3=new c("P3",d.Standard),o.PalaceResorts=new c("PalaceResorts"),o.PanHospitality=new c("PanHospitality",d.Standard),o.Paraty=new c("Paraty",d.Standard),o.Pegasus=new c("Pegasus",d.Standard),o.Pelican=new c("Pelican",d.Standard),o.Phobs=new c("Phobs",d.Standard),o.Planet=new c("Planet",d.Standard),o.PointAHotels=new c("PointAHotels",d.Custom),o.Prestige=new c("Prestige",d.Standard),o.ProfitRoom=new c("ProfitRoom",d.Standard),o.Protel=new c("Protel",d.Standard),o.PursuitCollection=new c("PursuitCollection",d.Custom),o.RedPlanet=new c("RedPlanet",d.Custom),o.RegalHotels=new c("RegalHotels",d.Custom),o.ReserveHotel=new c("ReserveHotel",d.Standard),o.ReserveOnline=new c("ReserveOnline",d.Standard),o.ReservationResources=new c("ReservationResources",d.Standard),o.Reservit=new c("Reservit",d.Standard),o.Reseze=new c("Reseze",d.Standard),o.ResNexus=new c("ResNexus",d.Standard),o.ResOnTheWeb=new c("ResOnTheWeb",d.Standard),o.Retargeting=new c("Retargeting",d.Internal),o.Revenatium=new c("Revenatium",d.Standard),o.Reztrip=new c("Reztrip",d.Standard),o.RGuest=new c("RGuest",d.Standard),o.RMSCloud=new c("RMSCloud",d.Standard),o.Roiback=new c("Roiback",d.Standard),o.RoomKey=new c("RoomKey",d.Standard),o.RoomMaster=new c("RoomMaster",d.Standard),o.RoomSome=new c("RoomSome",d.Standard),o.RoomStay=new c("RoomStay",d.Standard),o.SandsVegas=new c("SandsVegas",d.Custom),o.Sandrix=new c("Sandrix",d.Standard),o.Sbe=new c("Sbe",d.Standard),o.SeamillHydro=new c("SeamillHydro",d.Custom),o.Seekda=new c("Seekda",d.Standard),o.Selfbook=new c("Selfbook",d.Standard),o.Shr=new c("Shr",d.Standard),o.SimpleBooking=new c("SimpleBooking",d.Standard),o.SiteMinder=new c("SiteMinder",d.Standard),o.Skipper=new c("Skipper",d.Standard),o.Skyware=new c("Skyware",d.Standard),o.Staah=new c("Staah",d.Standard),o.StationCasinos=new c("StationCasinos",d.Custom),o.Stayntouch=new c("Stayntouch",d.Standard),o.Sweett=new c("Sweett",d.Custom),o.Synxis=new c("Synxis",d.Standard),o.SysHotelOnline=new c("SysHotelOnline",d.Standard),o.Taj=new c("Taj",d.Custom),o.ThinkReservations=new c("ThinkReservations",d.Standard),o.Travelanium=new c("Travelanium",d.Standard),o.TravelClick=new c("TravelClick",d.Standard),o.Uibscrs=new c("Uibscrs",d.Standard),o.Up=new c("Up",d.Standard),o.VacationMarbella=new c("VacationMarbella",d.Custom),o.Valamar=new c("Valamar",d.Custom),o.VandervalkOnline=new c("VandervalkOnline",d.Custom),o.VerticalBooking=new c("VerticalBooking",d.Standard),o.Viato=new c("Viato",d.Standard),o.Vinpearl=new c("Vinpearl",d.Custom),o.WebRezPro=new c("WebRezPro",d.Standard),o.WestCordHotels=new c("WestCordHotels",d.Custom),o.Witbooking=new c("Witbooking",d.Standard),o.Youngs=new c("Youngs",d.Custom),o.Zafiro=new c("Zafiro",d.Custom),o.SelfIntegration=new Set([c.Dirs21,c.HtiSystems,c.ExtendedStayAmerica]);function Hs(t,...e){let r=nr(t,...e);if(!r)return;let[n]=[...r].reverse();return n}function En(t){let e=f(()=>t.host.toLowerCase(),""),r=t.toString().toLowerCase();if(e==="gc.synxis.com")return o.Synxis;if(e==="be.synxis.com")return o.Synxis;if(e.indexOf("travelclick")!==-1)return o.TravelClick;if(e.indexOf("thebookingbutton.")!==-1||e.indexOf("book-directonline.")!==-1||e.indexOf("direct-book.")!==-1)return o.SiteMinder;if(e.indexOf(".hyatt.")!==-1)return o.Hyatt;if(e.indexOf(".bookonthenet.")!==-1)return o.RoomKey;if(e.indexOf("firmdalehotels")!==-1)return o.Firmdale;if(e.indexOf("apxhotelsapartments")!==-1||e.indexOf("mews.li")!==-1)return o.Mews;if(e.indexOf(".guestline.")!==-1||e.indexOf(".roomlynx.")!==-1)return o.GuestLine;if(e.indexOf("book-onlinenow.net")!==-1)return o.BookOnlineNow;if(e.indexOf("windsurfercrs.com")!==-1)return o.Shr;if(e.indexOf("bestwestern.fr")!==-1)return o.BestWesternFrance;if(r.indexOf("webrez.com")!==-1||e.indexOf("worldweb.com")!==-1||e.indexOf("webrez.com/v")!==-1)return o.WebRezPro;if(e.indexOf("hoteliers.com")!==-1)return o.Hoteliers;if(e.indexOf("doylecollection")!==-1)return o.DoyleCollection;if(r.indexOf("/bookcore/")!==-1)return o.Roiback;if(e.indexOf("nativeplaces.com")!==-1)return o.NativePlaces;if(r.indexOf("/cgi-bin/lansaweb")!==-1)return o.StationCasinos;if(e==="www.palms.com")return o.StationCasinos;if(e.indexOf(".webhotel.")!==-1)return o.Opera;if(e.indexOf("online.bookvisit.")!==-1)return o.BookVisit;if(e.indexOf("direct-reservation")!==-1)return o.BusyRooms;if(e.indexOf("youngshotels")!==-1)return o.Youngs;if(e.indexOf("loewshotels")!==-1)return o.Loews;if(e.indexOf("regalhotel")!==-1)return o.RegalHotels;if(e.indexOf("live.high-level-software")!==-1)return o.HighLevelSoftware;if(e.indexOf("premiereserve.com")!==-1||e.indexOf("teg-hotels.com")!==-1)return o.Everly;if(e.indexOf("simplebooking")!==-1||e.indexOf("booking.crimsonhotel")!==-1)return o.SimpleBooking;if(e.indexOf("bookassist.com")!==-1)return o.BookAssist;if(e.indexOf("booking.africaalbidatourism.com")!==-1)return o.AfricaAlbida;if(e.indexOf("onepagebooking.com")!==-1)return o.HotelNetSolutions;if(e.indexOf("reservhotel.com")!==-1)return o.ReserveHotel;if(r.indexOf("/irmng")!==-1)return o.IRM;if(e.indexOf("booking-channel.com")!==-1)return o.Hotusa;if(e.includes(".venetian.")||e.includes(".venetianlasvegas."))return o.SandsVegas;if(e.indexOf("clock-software.com")!==-1||e.indexOf("villasriomar.com")!==-1)return o.Clock;if(["tajinnercircle.",".tajhotels.",".gateway-hotels.",".seleqtionshotels.",".vivantahotels."].some(i=>e.indexOf(i)!==-1))return o.Taj;if(e.indexOf("booking.iberostartheclub.com")!==-1)return o.Iberostar;if(e.indexOf("services.comwell.com")!==-1)return o.Comwell;if(e.indexOf(".profitroom.")!==-1)return o.ProfitRoom;if(e.indexOf("bookingexpert.it")!==-1)return o.BookingExpert;if(e.indexOf("cloud-reservations.net")!==-1)return o.Hart;if(e.indexOf("pr.palaceresorts.com")!==-1||e.indexOf("pr.moonpalace.com")!==-1||e.indexOf("pr.leblancsparesorts.com")!==-1||e.indexOf(".palaceelite.com")!==-1)return o.PalaceResorts;if(e.indexOf(".iqwebbook.com")!==-1)return o.InnQuest;if(e.indexOf("theguild.co")!==-1)return o.Guild;if(e.indexOf(".innroad.com")!==-1)return o.InnRoad;if(e.indexOf(".furama.com")!==-1)return o.Furama;if(e.indexOf(".reztrip.com")!==-1)return o.Reztrip;if(e.indexOf("nisekoportfolio.com")!==-1)return o.BookEasy;if(e.indexOf(".steigenberger.com")!==-1||e.indexOf(".intercityhotel.com")!==-1||e.indexOf(".maxxhotel.com")!==-1||e.indexOf(".jaz-hotel.com")!==-1)return o.DeutscheHospitality;if(e.indexOf(".cloudbeds.com")!==-1)return o.CloudBeds;if(e.indexOf(".thehoxton.com")!==-1)return o.Hoxton;if(e.indexOf(".lottehotel.com")!==-1)return o.Lotte;if(e.indexOf("kempinski.com")!==-1)return o.Kempinski;if(e.indexOf("derquebooking")!==-1)return o.DerqueBooking;if(e.indexOf(".gfhoteles.")!==-1)return o.DerqueBooking;if(e.indexOf(".redplanethotels.com")!==-1)return o.RedPlanet;if(e.indexOf(".banffjaspercollection.com")!==-1||e.indexOf(".glacierparkcollection.com")!==-1)return o.PursuitCollection;if(e.indexOf(".bestwestern.co.uk")!==-1)return o.BestWesternUk;if(e.indexOf(".sbe.com")!==-1)return o.Sbe;if(e.indexOf(".reserve-online.net")!==-1)return o.ReserveOnline;if(e.indexOf("secure-hotel-booking.com")!==-1)return o.AvailPro;if(e.indexOf(".syshotelonline.it")!==-1)return o.SysHotelOnline;if(e.indexOf(".reservit.com")!==-1)return o.Reservit;if(e.indexOf("vinpearl.com")!==-1)return o.Vinpearl;if(e.indexOf(".omnibees.com")!==-1)return o.Omnibees;if(e.indexOf(".hipotels.com")!==-1)return o.Hipotels;if(e.indexOf(".handpickedhotels.co.uk")!==-1)return o.HandPickedHotels;if(e.indexOf("bookings.zafirohotels.com")!==-1)return o.Zafiro;if(e.indexOf(".viatocrs.de")!==-1)return o.Viato;if(e.indexOf(".easy-booking.")!==-1)return o.EasyBooking;if(e.indexOf(".ipms247.")!==-1||e.indexOf("reservas.hotelkokai.com")!==-1)return o.Ezee;if(e.indexOf(".innstyle.")!==-1)return o.InnStyle;if(e.indexOf(".book-secure.")!==-1)return o.FastBooking;if(e.indexOf(".cityexpress.")!==-1)return o.CityExpress;if(e.indexOf(".hoteleasyreservations.")!==-1)return o.EasyConsulting;if(e.indexOf(".travelanium.")!==-1)return o.Travelanium;if(e.indexOf(".e-gds.")!==-1)return o.EGds;if(e.indexOf(".booking.com")!==-1)return o.Booking;if(e.indexOf(".iperbooking.")!==-1)return o.Iperbooking;if(e.indexOf(".okuhotels.")!==-1)return o.OKU;if(e.indexOf(".pegsbe.")!==-1)return o.Pegasus;if(e.indexOf(".the-ascott.")!==-1||e.indexOf(".discoverasr.")!==-1)return o.Ascott;if(e.indexOf("kasa.")!==-1)return o.Kasa;if(e.indexOf("verticalbooking.")!==-1)return o.VerticalBooking;if(e.indexOf(".avvio.")!==-1)return o.Avvio;if(e.indexOf(".bestwestern.it")!==-1)return o.BestWesternItaly;if(e.indexOf("extendedstayamerica.")!==-1)return o.ExtendedStayAmerica;if(e.indexOf(".fourseasons.")!==-1||e.indexOf(".fourseasonscountryclub.")!==-1||e.indexOf(".fsweb.")!==-1)return o.FourSeasons;if(e.indexOf(".hti-systems.")!==-1)return o.HtiSystems;if(e.indexOf("lhw.")!==-1)return o.LHW;if(e.indexOf("nh-hotels.")!==-1||e.indexOf(".nh-hoteles.")!==-1||e.indexOf("nh-collection.")!==-1)return o.NHHotels;if(e.indexOf(".h-hotels.")!==-1)return o.HHotels;if(e.indexOf(".1hotels.")!==-1)return o.OneHotels;if(e.indexOf(".asiwebres.")!==-1)return o.ASIWebRes;if(e.indexOf(".bwhhotelgroup.")!==-1)return o.BWHHotelGroup;if(e.indexOf(".frontdeskmaster.")!==-1)return o.FrontDeskMaster;if(e.indexOf(".evancy.")!==-1)return o.Evancy;if(e.indexOf(".brochner-hotels.")!==-1)return o.BrochnerHotels;if(e.indexOf(".welcome-anywhere.")!==-1)return o.RoomMaster;if(e.indexOf("staybloom.")!==-1)return o.Bloom;if(e.indexOf(".keahotels.")!==-1)return o.KeaHotels;if(e.indexOf("westcordhotels.")!==-1)return o.WestCordHotels;if(e.indexOf(".lumahotels.")!==-1)return o.LumaHotels;if(e.indexOf(".reservation-system.")!==-1||e.indexOf(".allhandsmarketing.")!==-1)return o.Pelican;if(e.indexOf(".pointahotels.")!==-1)return o.PointAHotels;if(e.indexOf(".hoteliers.guru")!==-1)return o.HoteliersGuru;if(e.indexOf(".reseze.")!==-1)return o.Reseze;if(e.indexOf(".aboveproperty.")!==-1)return o.AboveProperty;if(e.indexOf(".superghs.")!==-1)return o.GHS;if(e.indexOf(".rguest.")!==-1)return o.RGuest;if(e.indexOf(".onagilysys.")!==-1)return o.RGuest;if(e.indexOf(".ayana.")!==-1)return o.Ayana;if(e.indexOf("erez.")!==-1)return o.Erez;if(e.indexOf(".valamar.")!==-1)return o.Valamar;if(e.indexOf(".stayntouch.")!==-1)return o.Stayntouch;if(e.indexOf("resnexus.com")!==-1)return o.ResNexus;if(e.indexOf(".namastay.io")!==-1)return o.Namastay;if(e.indexOf("guestrez.")!==-1)return o.GuestRez;if(e.indexOf(".phobs.")!==-1)return o.Phobs;if(e.indexOf(".staah.")!==-1||e.indexOf(".swiftbook.")!==-1)return o.Staah;if(e.indexOf(".hamiltonisland.")!==-1||e.indexOf(".qualia.")!==-1)return o.HamiltonIsland;if(e.indexOf(".hamiltonislandholidayhomes.")!==-1)return o.HamiltonIslandHolidayHomes;if(r.indexOf("luxguests")!==-1)return o.Luxscapia;if(r.indexOf(".thinkreservations.")!==-1)return o.ThinkReservations;if(r.indexOf(".witbooking.")!==-1)return o.Witbooking;if(r.indexOf(".onejourney.")!==-1)return o.Journey;if(r.indexOf(".resontheweb.")!==-1)return o.ResOnTheWeb;if(e.indexOf(".bookoloengine.")!==-1)return o.Bookolo;if(e.indexOf(".openhotel.")!==-1)return o.OpenHotel;if(e.indexOf(".revenatium.")!==-1)return o.Revenatium;if(e.indexOf(".millenniumhotels.")!==-1)return o.MillenniumHotels;if(e.indexOf(".hotelkeyapp.")!==-1)return o.HotelKeyApp;if(e.indexOf(".omegahotelmanagement.")!==-1)return o.OmegaHotelManagement;if(e.indexOf(".panhospitality.")!==-1)return o.PanHospitality;if(e.indexOf(".skywaresystems.")!==-1)return o.Skyware;if(e.indexOf(".guestcentric.net")!==-1)return o.GuestCentric;if(e.indexOf(".justbestbooking.")!==-1)return o.JustBestBooking;if(e.indexOf(".nightsbridge.")!==-1)return o.Nightsbridge;if(e.indexOf(".rmscloud.")!==-1)return o.RMSCloud;if(e.indexOf("honeycomb.rt.triptease.io")!==-1||e.indexOf("b.triptease.io")!==-1)return o.Retargeting}function Xl(t){var e,r;if(t.document.querySelector('link[href*="synxis.com"]'))return o.Synxis;if(f(()=>Object.values(t.process.env).some(n=>f(()=>String(n).includes("synxis")))))return o.Synxis;if(f(()=>Object.keys(t).filter(i=>i.endsWith("Url")).map(i=>t[i]).some(i=>String(i).includes("travelclick.com")))||f(()=>!!Hs(t.dataLayer,"ihHotelID"),!1))return o.TravelClick;if(f(()=>!!t.digitalPartner.triptease))return o.SiteMinder;if(f(()=>t.dataLayer.some(n=>n.neobookings),!1))return o.NeoBookings;if(f(()=>Hs(t.dataLayer,"context.application")==="smart",!1))return o.AvailPro;if(t.document.querySelector("iframe.mews-distributor"))return o.Mews;if(t.WSMAIN||t.WsVars)return o.Shr;if(f(()=>t.document.querySelector("#clienId"),void 0))return o.RMSCloud;if(t.document.getElementById("bookingGadget")!==null)return o.GuestCentric;if(Boolean(t.document.querySelector('script[src*="UiBSJs"]')))return o.Uibscrs;if(f(()=>Boolean(t.Mirai),!1))return o.Mirai;if(t.MAIN_SITE==="paraty"||t.document.querySelector(".paraty-booking-form")||t.document.querySelector('img[src*=".paraty."]'))return o.Paraty;if(!!t.document.querySelector('[href^="https://www.booking2hotels.com"]')||t.document.querySelector('.booking-engine img[src*="booking2hotels"]'))return o.Booking2Hotels;if(t.document.querySelector('script[src*="seekda"]'))return o.Seekda;if(t.document.querySelector('meta[name="author"][content*="alaric"], [href*="alaric."]'))return o.Alaric;if(f(()=>t.document.cookie.split(/[=; ]/).find(n=>n==="alrcBasicToken")))return o.Alaric;if(f(()=>t.document.querySelector('meta[name="description"]').content.indexOf("reztrip")!==-1,!1))return o.Reztrip;if(f(()=>!!t.PROTELWBE5,!1))return o.Protel;if(f(()=>t.document.querySelector('link[href*="/bookvisit/"], meta[content*=".bookvisit."]')))return o.BookVisit;if(f(()=>t.document.querySelector('link[href*="webhotelier.net"]')))return o.ReserveOnline;if(f(()=>t.document.querySelector("#availpro-tracker")))return o.AvailPro;if(f(()=>t.document.querySelector("meta[name=Author][content*=RESERVIT]")))return o.Reservit;if(f(()=>t.document.querySelector("#eZee_BookingContainer, #eZee_BookingHeader, #eZee_BookingFilter, #eZ_BookingRooms")))return o.Ezee;if(f(()=>t.document.querySelector("img[src*=hotetec],a[href*=hotetec]")))return o.Hotetec;if(f(()=>t.document.querySelector("link[href*=cityexpress]")))return o.CityExpress;if(f(()=>t.document.querySelector("link[href*=travelanium]")||t.document.querySelector("input#ibe-base-url")))return o.Travelanium;if(f(()=>t.document.querySelector('a[href*=".e-gds."],img[src*=".e-gds."]')))return o.EGds;if(f(()=>t.document.querySelector('img[src*=".pegsbe."],img[src*=".bookingdirect."]')))return o.Pegasus;if(f(()=>t.document.querySelector("a[href*=verticalbooking], a[href*=VerticalBooking], script[src*=verticalbooking]"))||f(()=>typeof t.b_params.booking_engine_default_url=="string"))return o.VerticalBooking;if(f(()=>t.document.querySelector("guestdesk")))return o.GuestDesk;if(t.document.querySelector("img[src*=booking-channel],div[style*=booking-channel]"))return o.Hotusa;if(t.document.querySelector('img[src*=".asiwebres."]'))return o.ASIWebRes;if(t.document.querySelector("body [class*=azds-booking]"))return o.AZDS;if(t.document.querySelector('[href*="compurez"]')||f(()=>t.document.querySelector("#footer").textContent.includes("CompuRez")))return o.CompuRez;if(t.document.querySelector('img[src*=".roommaster."],div[style*=".roommaster."]'))return o.RoomMaster;if(t.document.querySelector("[ng-app=PelicanApp]")||f(()=>t.myApp.name)==="PelicanApp")return o.Pelican;if(t.document.querySelector('#avvio, [href*="avvio.com"], [src*="avvio.com"]'))return o.Avvio;if(t.document.querySelector('[src*=".shrglobal."],[href*=".shrglobal."]'))return o.Shr;if(t.document.querySelector('[href*=".infotera."]'))return o.Infotera;if(t.document.querySelector('img[src*=".hoteliers.guru"]'))return o.HoteliersGuru;if(f(()=>typeof t.iBooking.hotel_alias=="string"))return o.GHS;if(t.document.querySelector('[src*=".omnibees."]'))return o.Omnibees;if(t.document.querySelector('[src*=".roomstay."],[href*=".roomstay."],[id*=roomstay-],[name*=roomstay-]'))return o.RoomStay;if(t.document.querySelector('[src*=".guestpro."],[href*="guestpro."]'))return o.GuestPro;if(f(()=>t.BookingEngine.SiteSettings.ApiUri,"").includes(".frontdeskmaster."))return o.FrontDeskMaster;if(t.location.host.indexOf(".opalcollection.")!==-1||typeof t.showOpalKeyPolicy=="function")return o.Sandrix;if(t.document.querySelector('[id^=erez],img[src*="erez."]'))return o.Erez;if(t.document.querySelector('ibe-up,[src*="ibe.uphotel.agency"]'))return o.Up;if(t.document.querySelector('img[src*=".profitroom."],[src*="upperbooking."]'))return o.ProfitRoom;if(f(()=>t.rt4Datalayer.ArrivalDtYYYYMMDD))return o.Pegasus;if(t.document.querySelector('[src*=".neobookings."]'))return o.NeoBookings;if(t.document.querySelector('a[href*="roomsome.hu"]'))return o.RoomSome;if(t.document.querySelector('[src*=".phobs."]'))return o.Phobs;if(t.document.querySelector('link[href*=".selfbook."]'))return o.Selfbook;if(t.document.querySelector("#PSBookEngine"))return o.Prestige;if(t.clockPmsWbePageViewCallback||t.document.querySelector('[src*=".clock-software."]'))return o.Clock;if(f(()=>{var n;return JSON.parse((n=t.sessionStorage.getItem("bookingengine"))!=null?n:"").session.chainData.booking_engine_configuration}))return o.Dingus;if(t.document.querySelector('link[href*="/luxscapia/"]'))return o.Luxscapia;if(t.document.querySelector('link[href*=".skipperhospitality."]'))return o.Skipper;if(!!((e=t.d21)==null?void 0:e.host)||!!((r=t.d21)==null?void 0:r.currentChannel))return o.Dirs21;if(f(()=>t.jsConfig.clientId))return o.Planet;if(t.document.querySelector('[href*="witbooking."]')||f(()=>t.wit_IntegrationId))return o.Witbooking;if(t.document.querySelector('a[href*=".p3hotels."]')||t.document.querySelector('script[src*="p3core"]'))return o.P3;if(f(()=>t.InntopiaManager))return o.Inntopia;if(t.document.querySelector('[href*=".netaffinity."]'))return o.NetAffinity;if(t.document.querySelector('a[href*=".atlantis.asia"]'))return o.AtlantisORS;if(t.document.querySelector('iframe[src*=".bookoloengine."]'))return o.Bookolo;if(t.document.querySelector('script[src*="res-online."],a[href*="hotelpartner.com"],link[href*="res-online."]'))return o.HotelPartner;if(t.document.querySelector('script[src*=".hopenapi."]'))return o.Exely;if(f(()=>!!t.STAAHBookingTracker)||t.document.querySelector('img[src*=".staah."]'))return o.Staah;if(f(()=>t.__NEXT_DATA__.props.pageProps.siteConfig.publicPath.includes(".revenatium.")))return o.Revenatium;if(t.document.querySelector('img[src*="hsprez."],img[src*="hsp-rez."]'))return o.HspRez;if(t.document.querySelector('[src*="newbook."]'))return o.Newbook;if(t.document.querySelector('[id*=bookonline],img[src*="book-onlinenow.net"]'))return o.BookOnlineNow;if(t.document.querySelector('[href*=".thinkreservations."]'))return o.ThinkReservations;if(t.document.querySelector("#hc-ibe-root"))return o.HotelChamp;if(t.document.querySelector('img[src*="b.triptease.io/assets"]'))return o.Retargeting}function ed(t){let e=f(()=>new E(t.location.href).host.toLowerCase(),"");if(e.indexOf("constancehotels.com")!==-1)return o.ConstanceHotels;if(e.indexOf("vacationmarbella.")!==-1)return o.VacationMarbella;if(t.document.querySelector("[src*=life-house],[href*=life-house]"))return o.LifeHouse;if(e.indexOf("cocotel.")!==-1)return o.Cocotel;if(t.document.querySelector('[href*=".latourhotelsandresorts."]')||["parkplazaresort.","cabinsatgreenmountain.","atlanticbeachresortnc.","sandpebblebeachclub.","coconutpalmsbeachresort."].find(r=>e.indexOf(r)!==-1))return o.LatourHotelsAndResorts;if(e.indexOf(".seamillhydro.")!==-1)return o.SeamillHydro;if(e.indexOf(".inkaterra.")!==-1)return o.Inkaterra;if(e.indexOf("reservationresources.")!==-1)return o.ReservationResources;if(e.indexOf(".mcdreamshotels.")!==-1)return o.McDreams;if(e.indexOf(".minorhotels.")!==-1)return o.MinorHotels;if(e.indexOf(".hiusa.")!==-1)return o.HiUsa;if(e.indexOf(".thebetsyhotel.")!==-1)return o.Betsy;if(e.indexOf(".centerhotels.")!==-1)return o.CenterHotels;if(e.indexOf(".clinkhostels.")!==-1)return o.Clink;if(e.indexOf(".jazhotels.")!==-1)return o.JazHotels;if(e.indexOf("sweett.")!==-1)return o.Sweett;if(e.indexOf(".mgmresorts.")!==-1||e.indexOf(".devtest.vegas")!==-1)return o.MgmResorts;if(t.document.querySelector('[href*=".kerzner"],[src*=".kerzner"]'))return o.Kerzner;if(e.indexOf(".gemhotels.")!==-1)return o.GemHotels;if(e.indexOf(".motel-one.")!==-1||e.indexOf(".the-cloud-one.")!==-1)return o.MotelOne;if(e.indexOf("www.banyantree.")!==-1||e.indexOf("www.angsana.")!==-1)return o.BanyanTree;if(e.indexOf(".eviivo.")!==-1)return o.Eviivo;if(e.indexOf("gleneagles.com")!==-1)return o.GlenEagles;if(e.indexOf(".vandervalkonline.")!==-1||t.document.querySelector('script[src*=".vandervalkonline."]'))return o.VandervalkOnline}function td(t){let e=t.querySelector('script[src*="static.triptease.io/client-integrations/"]');if(!e)return;let[,r]=f(()=>e.src.match(/\/([^/]+).js$/))||[];if(!!r)return f(()=>o.parse(r))}function rd(t){return f(()=>{let r=t.document.querySelector('script[src*="onboard.triptease.io/bootstrap.js"]').src.match(/fallback=([a-zA-Z]+)/)[1];return o.parse(r)})}function nd(t){let e=f(()=>new E(t.location.href).host.toLowerCase(),""),r=t.location.href.toString().toLowerCase();if(e.indexOf(".bachmann-hotels.")!==-1&&r.indexOf("confirmation")!==-1)return o.Protel;if(e.indexOf("aubergeresorts.")!==-1&&e.indexOf("reserve.aubergeresorts.")===-1)return o.Auberge;if(e.indexOf(".fullertonhotels.")!==-1)return o.FullertonHotels}function Ls(t){return f(()=>En(new E(t.location.href)))||f(()=>Xl(t))||f(()=>ed(t))||td(t.document)||rd(t)||nd(t)||o.Default}var br=class{constructor(e,r,n=y("messaging")){this.listen=e;this.router=r;this.logger=n;this.rules=[];e.addListener(this.handler.bind(this)),this.addRule(kn,i=>i,i=>i),this.addRule(od,ad,qs)}registerAlias(e,r){if(!this.router.hasHandlerFor(r))throw new Error(`Illegal alias: Method "${r}" is not registered with router`);return this.addRule(id(e),sd(r),qs)}handler(e,r){return p(this,null,function*(){if(ur(e))return;this.logger.debug("listenOn received request",e);let n=this.rules.find(a=>a.predicate(e));if(!n)return;let i=n.requestConverter(e),s=yield this.router.handle(i);if(vs(s)){this.logger.debug(`Handler not found for request "${i.requestType}", potentially for another listener`);return}e.correlationId&&e.correlationId===s.correlationId&&(this.logger.debug("listenOn sending response to sender",s),r.send(n.responseConverter(s)))})}addRule(e,r,n){return this.rules.push({predicate:e,requestConverter:r,responseConverter:n}),this}};function id(t){return e=>e.type===t}function od(t){return!kn(t)&&!!t.correlationId}function sd(t){return e=>({type:"triptease.onboard.request",requestType:String(t),payload:[e],correlationId:e.correlationId||"fire-and-forget"})}function ad(t){let{value:e,correlationId:r}=t,{method:n}=mn(t.type);return{type:"triptease.onboard.request",requestType:n,payload:[e],correlationId:r}}function qs(t){return{type:"triptease.onboard.response",correlationId:t.correlationId,value:t.payload}}var vt=class{static find(e){return this.scripts(e).map(r=>new E(r.src))}static scripts(e){let n=["bootstrap.js","/paperboy/","/identity-service/confirm"].map(s=>`script[src*="${s}"][src*="triptease.io"]`);n.push('script[src*="triptease.net"]');let i=n.join(", ");return e.querySelectorAll(i)}};var vr=class{static difference(e,r){return Array.from(e).reduce((n,i)=>r.has(i)?n:n.add(i),new Set)}};var St=y("events"),In=class{constructor(e,r){this.timers=e;this.handle=r;this.finders=new Set;this.keepers=new Set;this.handleEvent=e=>p(this,null,function*(){try{St.debug("CreatedOrDeletedEvents: Checking for new created items");let r=new Set(Array.from(this.finders).flatMap(s=>s())),n=vr.difference(r,this.keepers),i=vr.difference(this.keepers,r);this.keepers=r,(n.size>0||i.size>0)&&(St.log(`CreatedOrDeletedEvents: ${n.size} created, ${i.size} deleted element detected - firing event`),yield this.handle(e))}catch(r){St.error("CreatedOrDeletedEvents.handleEvent threw while polling",r)}})}start(){return p(this,null,function*(){St.log("Start polling for created items"),this.id=this.timers.setInterval(this.handleEvent,1e3)})}stop(){return p(this,null,function*(){St.log("Stop polling for created items"),this.id&&(this.timers.clearInterval(this.id),this.id=void 0)})}watch(e){e().forEach(n=>this.keepers.add(n)),this.finders.add(e)}};function js(t,e){return()=>Array.from(t.querySelectorAll(e))}var cd=y("events"),Rn=class{constructor(e,r){this.window=e;this.delegate=r;this.first=!0;this.fire=e=>p(this,null,function*(){if(this.window.document.hidden&&!this.first){cd.log("Document hidden - skipping",e);return}yield this.delegate.fire(e),this.first=!1})}listen(e){return p(this,null,function*(){yield this.delegate.listen(e)})}removeListener(e){this.delegate.removeListener(e)}};var Mn=y("events"),_n=class{constructor(e,r){this.delegate=e;this.running=r;this.fire=e=>p(this,null,function*(){if(this.running.value){Mn.log("Already running - skipping",e);return}this.running.value=!0,yield this.delegate.fire(e),this.running.value=!1})}listen(e){return p(this,null,function*(){if(yield this.delegate.listen(e),this.running.value){Mn.log("Already running - firing immediately");try{yield e()}catch(r){Mn.log(r)}}})}removeListener(e){this.delegate.removeListener(e)}};var Us=y("events"),Dn=class{constructor(){this.handlers=[];this.fire=e=>p(this,null,function*(){Us.log(`Firing handlers(${this.handlers.length})`,e),yield Promise.all(this.handlers.map(r=>p(this,null,function*(){try{yield r()}catch(n){Us.log("Error while firing handler",n)}})))})}listen(e){return p(this,null,function*(){this.handlers.push(e)})}removeListener(e){this.handlers=this.handlers.filter(r=>r!==e)}};var Bs=y("events"),Hn=class{constructor(e,r){this.timers=e;this.delegate=r;this.timeoutMs=1e3;this.timerId=0;this.fire=e=>p(this,null,function*(){Bs.log(`Event observed, waiting for ${this.timeoutMs} ms quiet`,e),this.timers.clearInterval(this.timerId),this.timerId=this.timers.setTimeout(()=>p(this,null,function*(){Bs.log("Event quiet period ended, firing event",e),yield this.delegate(e)}),this.timeoutMs)})}};var ld=y("events"),Ln=class{constructor(e,r,n=.2,i=new F){this.handle=e;this.running=r;this.idleThreshold=n;this.timers=i;this.lastState=!1;this.busy=!1;this.average=new xt;this.idleHandler=e=>{let r=e.timeRemaining();this.running.value?this.busy=!1:r===0?this.busy=!0:(this.average=this.average.calculate(r),this.busy=this.average.percentage<-this.idleThreshold),this.busy?this.idleId=void 0:this.idleId=this.timers.requestIdleCallback(this.idleHandler,r===0?void 0:{timeout:r})};this.intervalHandler=()=>p(this,null,function*(){this.stateHasChanged()&&this.isIdle()&&(ld.log("Browser idle"),yield this.handle("Idle")),this.average=new xt,this.lastState=this.busy,this.idleId||(this.idleId=this.timers.requestIdleCallback(this.idleHandler))})}start(){return p(this,null,function*(){this.intervalId=this.timers.setInterval(this.intervalHandler,1e3),this.idleId=this.timers.requestIdleCallback(this.idleHandler)})}stop(){return p(this,null,function*(){this.intervalId&&this.timers.clearInterval(this.intervalId),this.idleId&&this.timers.cancelIdleCallback(this.idleId)})}isIdle(){return!this.busy}stateHasChanged(){return this.lastState!==this.busy}},xt=class{constructor(e=0,r=0,n=0,i=0){this.value=e;this.count=r;this.difference=n;this.percentage=i}calculate(e){let r=this.count+1,n=e-this.value,i=n/this.value,s=this.value+n/r;return new xt(s,r,n,i)}};var qn=class{constructor(e,r){this.window=e;this.handle=r}start(){return p(this,null,function*(){this.window.addEventListener("visibilitychange",this.handle),this.window.addEventListener("popstate",this.handle),this.window.addEventListener("hashchange",this.handle),this.window.addEventListener("pageshow",this.handle),this.window.addEventListener("pagehide",this.handle),this.window.document.readyState!=="complete"?this.window.document.addEventListener("DOMContentLoaded",this.handle):yield this.handle("Document already loaded")})}stop(){return p(this,null,function*(){this.window.removeEventListener("visibilitychange",this.handle),this.window.removeEventListener("popstate",this.handle),this.window.removeEventListener("hashchange",this.handle),this.window.removeEventListener("pageshow",this.handle),this.window.removeEventListener("pagehide",this.handle),this.window.document.removeEventListener("DOMContentLoaded",this.handle)})}};var jn=class{constructor(){this.value=!1}};var Gs=class{constructor(e,r=new F){this.window=e;let n=new jn;this.sink=new Rn(e,new _n(new Dn,n)),this.fire=new Hn(r,this.sink.fire).fire,this.mutation=new wt(this.fire),this.created=new In(r,this.fire),this.sources=[new Ln(this.fire,n),this.mutation,this.created,new qn(e,this.fire)]}watch(e){this.created.watch(e)}listen(e){return p(this,null,function*(){yield this.sink.listen(e)})}start(){return p(this,null,function*(){yield Promise.all(this.sources.map(e=>e.start()))})}stop(){return p(this,null,function*(){this.sources.forEach(e=>e.stop())})}removeListener(e){this.sink.removeListener(e)}};function Sr(t){let e=P(t).triptease;return e.events=e.events||new Gs(t)}var dd={characterData:!0,attributes:!0,childList:!0},wt=class{constructor(e){this.handle=e;this.observer=new MutationObserver(this.handle)}start(){return p(this,null,function*(){})}stop(){return p(this,null,function*(){this.observer.disconnect()})}static observe(e,r=dd){if(!("MutationObserver"in L))return e;let n=Sr(L).mutation;return e instanceof HTMLInputElement||e instanceof HTMLSelectElement?e.addEventListener("change",n.handle):n.observer.observe(e,r),e}};function Un(t,e=L){return f(()=>Sr(e).watch(js(e.document,t))),t}var Bn=class{constructor(e){this.parent=e}querySelector(e,r){let n=this.parent.querySelector(e);return n||void 0}querySelectorAll(e,r){return Array.from(this.parent.querySelectorAll(e))}},Gn=class{constructor(e){this.parent=e}querySelector(e,r){var i;Un(e,(i=this.parent.ownerDocument)==null?void 0:i.defaultView);let n=this.parent.querySelector(e);return n?wt.observe(n,r):void 0}querySelectorAll(e,r){var n;return Un(e,(n=this.parent.ownerDocument)==null?void 0:n.defaultView),Array.from(this.parent.querySelectorAll(e)).map(i=>wt.observe(i,r)).filter(Boolean)}};function xr(t){let e=sr(t,"triptease-applications")||"auto";return f(()=>{let[r]=vt.find(new Bn(t.document)),{applications:n}=G(r.query);return n},e).toLowerCase()}var kt=class{constructor(e,r,n){this.window=e;this.messageBatcher=r;this.messageBuilder=n}static create(e,r,n){var s;let i=P(e).onboard;return i.trackingApi=(s=i.trackingApi)!=null?s:new kt(e,r,n)}get isEnabled(){return xr(this.window)!=="none"}trackConfig(e){return p(this,null,function*(){!this.isEnabled||f(()=>e.payload.type===K.Payment)||(yield this.messageBatcher.send(g.removeEmpty(e)))})}trackEvent(e){return p(this,null,function*(){!this.isEnabled||(yield this.messageBatcher.send(e))})}trackError(e){return p(this,null,function*(){yield this.trackLog({context:{app:ht},payload:e,errorType:mt(e)?"exception":"console",level:"error"})})}trackMessage(e){return p(this,null,function*(){yield this.trackLog({context:{app:ht},payload:e,level:"info"})})}trackLog(e){return p(this,null,function*(){!this.isEnabled||(yield this.messageBatcher.send(yield this.messageBuilder.buildMessage(D(w({},e),{type:mr.Log}))))})}};var Ct=class{constructor(e,r,n,i=Se.create(e),s=y("integration-executor")){this.window=e;this.kernel=r;this.consent=n;this.starter=i;this.logger=s;s.debug("DefaultApplicationLoader constructor called")}loadApplications(e){return p(this,null,function*(){var m;let r=xr(this.window);if(r==="none"||r==="tracking")return this.logger.log(`applications set to "${r}", skipping loading`),{};let{integrationId:n,clientKey:i,apiKey:s}=e,{applications:a}=(m=yield this.kernel.applicationConfig({integrationId:n,clientKey:i,apiKey:s,includeDisabled:!0}))!=null?m:{applications:[]},l=this.filterApplications(r,a);return(yield Promise.all(l.map(h=>p(this,null,function*(){let A=this.consent.for(h);try{if(ud(h,A,r))return yield this.starter.start(h),D(w({},h),{started:!0,consent:A})}catch(S){return D(w({},h),{started:!1,consent:A,error:S.message})}return D(w({},h),{consent:A})})))).reduce((h,A)=>(h[A.name]=g.removeEmpty({enabled:A.enabled,started:A.started,consent:A.consent,error:A.error}),h),{})})}filterApplications(e,r){return e==="auto"?r:r.filter(n=>n.name.toLowerCase()===e)}static create(e,r,n){var s;let i=P(e).triptease.onboard;return i.applicationLoader=(s=i.applicationLoader)!=null?s:new Ct(e,r,n)}};function ud(t,e,r){return Xo(t)?r===t.name.toLowerCase()?!0:t.enabled&&e==="Granted":!1}var xa=R(he());function wr(t){return t&&f(()=>t instanceof HTMLAnchorElement,t.tagName==="A")}var Ws=R(nn()),Fs=R(dt());function Wn(t){var e;return((e=t.host)==null?void 0:e.split("."))||[]}function kr(t,e){let r=Wn(t).reverse(),n=Wn(e).reverse(),i=0;for(let[s,a]of(0,Ws.array)(r,(0,Fs.zip)(n)))if(s===a)i++;else break;return i>=3?!0:i===2?[r[i],n[i]].filter(s=>![void 0,"www"].includes(s)).length<=1:!1}function Ks(t){let[e]=Wn(t);return e}var pd=new Set([void 0,o.Default]);function zs(t){return!pd.has(En(t))}function Vs(t,e){if(t.host===e.host)return!1;let r=kr(t,e);return!!(!r&&zs(e)||r&&md(e))}var fd=["book","reservation","reservas"];function md(t){let e=Ks(t);return e&&fd.some(r=>e.includes(r))}var gd=new Set(["book now","book","book room","book your stay","booking","check rates","check availability","cancel reservation","my reservations","reservations","reserve agora","show availability"]);function Ns(t){return bd(t).some(e=>gd.has(e))}function yd(t,e){let r=new E(e.href);return!!(Vs(t,r)||Ns(e))}function hd(t,e){let r=e.form;if(!r)return!1;let n=new E(e.formAction||e.getAttribute("formaction")||r.action);return!!(Vs(t,n)||Ns(e))}function $s(t,e){return zs(t)?!1:wr(e)?yd(t,e):hd(t,e)}function bd(t){return[t.innerText||t.textContent,t.value,t.title,t.getAttribute("alt")].filter(Boolean).map(e=>e.trim().toLowerCase())}function vd(t){var e,r;return(r=(e=t.innerText)!=null?e:t.textContent)==null?void 0:r.trim()}function Js(t){var e;return g.removeEmpty({element:t.tagName.toLowerCase(),classes:Array.from(t.classList),id:t.id,target:t.target.trim(),url:t.href.trim(),urlParsed:Y(t.href),text:vd(t),title:t.title.trim(),alt:(e=t.getAttribute("alt"))==null?void 0:e.trim(),rel:Array.from(t.relList)})}function Ys(t){var r,n;let{text:e=""}=(r=t==null?void 0:t.click)!=null?r:{};return!(e.length<4||(t==null?void 0:t.integrationName)!==o.Default.canonical||!((n=t==null?void 0:t.language)==null?void 0:n.startsWith("en")))}var Sd=y("click-tracking"),Fn=class{constructor(e,r){this.window=e;this.bootstrap=r;this.clickHandler=e=>p(this,null,function*(){try{let r=e.target;if(wr(r)){let n=new E(this.window.location.href),i=new E(r.href);if(i.scheme==="javascript"||i.scheme==="about")return;let s=P(this.window).triptease.config,a={integrationId:s==null?void 0:s.integrationId,integrationName:s==null?void 0:s.integrationName,clientKey:s==null?void 0:s.clientKey,clientName:s==null?void 0:s.clientName,apiKey:s==null?void 0:s.apiKey,hotelName:s==null?void 0:s.hotelName,language:s==null?void 0:s.language,click:Js(r)};i.scheme==="tel"?yield this.fireClickEvent("user_clicked_phone-number",a):i.scheme==="mailto"?yield this.fireClickEvent("user_clicked_email-address",a):$s(n,r)?yield this.fireClickEvent("user_clicked_booking-engine-link",a):r.href&&!kr(n,i)?yield this.fireClickEvent("user_clicked_outbound-link",a):Ys(a)&&(yield this.fireClickEvent("user_clicked_link",a))}}catch(r){Sd.error("clickHandler: Error ",r)}})}start(){this.window.addEventListener("click",this.clickHandler,{capture:!0,passive:!0})}stop(){this.window.removeEventListener("click",this.clickHandler)}fireClickEvent(e,r){return p(this,null,function*(){yield this.bootstrap.processEvent(g.removeEmpty({type:"triptease.event",event:e,payload:r}))})}};function Zs(t){switch(t){case"essential":case"necessary":return"essential";case"functionality":case"personalisation":case"preferences":return"functionality";case"performance":case"statistics":case"analytics":return"performance";case"marketing":case"advertising":return"marketing"}}var Kn=class{constructor(e){this.window=e}find(){let e=["necessary","preferences","statistics","marketing"].map(r=>f(()=>this.window.Cookiebot.consent[r])?Zs(r):void 0).filter(Boolean);if(e.length>0)return{type:"cmp",source:te.cookieBot,values:e}}};var Qs=new Set(["all"]);function Xs(t){let e=new Set(t.filter(Boolean));return e.size===0||e.has("all")?Qs:(e.has("none")&&e.size!==1&&e.delete("none"),e.has("auto")&&e.size!==1&&e.delete("auto"),e)}var xd=new Map([["ad_storage",["marketing"]],["ad_user_data",["marketing"]],["ad_personalization",["marketing","functionality"]],["analytics_storage",["performance"]],["functionality_storage",["functionality"]],["personalization_storage",["functionality"]],["security_storage",["essential"]]]);function wd(t){return t.filter(r=>r&&r[0]==="consent"&&r[1]==="default").map(r=>r[2]).reduce((r,n)=>(Object.entries(n).forEach(([i,s])=>{r[i]=r[i]==="denied"?"denied":s}),r),{})}var zn=class{constructor(e){this.window=e}find(){if(Array.isArray(this.window.dataLayer)){let e=wd(this.window.dataLayer),r=this.window.dataLayer.filter(a=>a&&a[0]==="consent"&&a[1]==="update").reduce((a,l)=>w(w({},a),l[2]),e),i=Object.entries(r).filter(([a,l])=>l==="granted").map(([a])=>a).reduce((a,l)=>{let u=xd.get(l)||[];return[...a,...u]},[]),s=C.unique(i);if(s.length>0)return{type:"cmp",source:te.google,values:s};if(s.length===0&&Object.keys(r).length>0)return{type:"cmp",source:te.google,values:["none"]}}}};var kd={app_basics:"essential",app_preference:"functionality",app_analytics:"performance",app_marketing:"marketing"},Vn=class{constructor(e){this.window=e}find(){let{consents:e}=f(()=>this.window.klaro.getManager(),{consents:{}}),r=Object.entries(kd).reduce((n,[i,s])=>e[i]?[...n,s]:n,[]);if(r.length>0)return{type:"cmp",source:te.klaro,values:r}}};var At=class{constructor(e,r,n){this.window=e;this.key=r;this.parser=n}values(){return this.scripts().map(r=>r.dataset[this.key]).filter(Boolean).flatMap(r=>r.split(/\s*,\s*/g).map(n=>this.parser.parse(n))).filter(r=>!!r)}scripts(){let e=vt.scripts(new Gn(this.window.document)),r=e.filter(n=>!n.src.includes("partner="));return r.length>0?r:e}};var Nn=class{constructor(e){this.lookup=e.reduce((r,n)=>r.set(n,n),new Map)}parse(e){if(!!e)return this.lookup.get(e.toLowerCase().trim())}},$n=class extends Nn{constructor(){super(["none","first-party","third-party","all"])}},Jn=class extends Nn{constructor(){super(["none","essential","functionality","performance","marketing","all","auto"])}};var Cd=y("consent"),ea=class extends At{constructor(e){super(e,"storageConsent",new Jn)}find(){let e=this.values();if(e.length>0)return{type:"script",source:"script",values:e}}},Yn=class{constructor(e,r=[new ea(e),new Kn(e),new Vn(e),new zn(e)]){this.finders=r}find(){return this.allConsents.overall}findAll(){return this.allConsents}get allConsents(){let e=this.finders.map(n=>n.find()).filter(Boolean);Cd.log("individual consents",e);let r=this.getOverallConsent(e);return[...e,r].reduce((n,i)=>{let s=i.type==="overall"?i.type:i.source;return n[s]=i,n},{})}getOverallConsent(e){let r=e.find(i=>i.type==="script"),n=e.find(i=>i.type==="cmp"&&i.values.length>0);return r?r.values.includes("auto")?n?{type:"overall",source:n.source,values:this.cleaned(n.values)}:{type:"overall",source:te.defaultAutoConsentMode,values:["none"]}:{type:"overall",source:r.source,values:this.cleaned(r.values)}:{type:"overall",source:te.defaultNoConsentMode,values:["all"]}}cleaned(e){return Array.from(Xs(e))}};var Ot=R($());var Zn=class extends At{constructor(e){super(e,"storage",new $n)}find(){let e=this.values();if(e.length>0)return{values:e}}};var Qn=y("consent"),Tt=class{constructor(e,r){this.callbacks=new Set;this.set(e,r)}onChange(e){this.callbacks.add(e)}set(e,r){Qn.debug("Setting Consent and Storage");let n=this.consent,i=this.storage;if(this.consent=new Set(e),this.storage=new Set(r),!n||!i)return this.fireChanged();let s=!_.same(Array.from(n).sort(Ot.ascending),Array.from(this.consent).sort(Ot.ascending)),a=!_.same(Array.from(i).sort(Ot.ascending),Array.from(this.storage).sort(Ot.ascending));if(s||a)return Qn.debug("Consent / Storage has changed"),this.fireChanged()}fireChanged(){this.callbacks.forEach(e=>{try{e()}catch(r){Qn.error(r)}})}toArray(){return Array.from(this.consent)}get applications(){let e=this.consent.has("functionality"),r=this.consent.has("performance"),n=this.consent.has("marketing"),i=this.consent.has("all");return new Map([["Chat",e||i?"Granted":"Denied"],["CrossOriginTracking","Granted"],["GoogleAnalyticsPrototype",r||n||i?"Granted":"Denied"],["Messages",e||n||i?"Granted":"Denied"],["Meta",r||n||i?"Granted":"Denied"],["PaidSearch",r||n||i?"Granted":"Denied"],["Parity",e||r||n||i?"Granted":"Denied"],["Retargeting",n||i?"Granted":"Denied"],["Audiences",n||i?"Granted":"Denied"],["PaidSocial",n||i?"Granted":"Denied"]])}for(e){return this.consent.has("all")?"Granted":this.applications.get(e.name)||(e.type==="other"?"Granted":"Denied")}get firstPartyStorage(){return this.storage.size===0?["functionality","performance","marketing","all"].some(e=>this.consent.has(e)):["first-party","all"].some(e=>this.storage.has(e))}get thirdPartyStorage(){return this.storage.size===0?["functionality","performance","marketing","all"].some(e=>this.consent.has(e)):["third-party","all"].some(e=>this.storage.has(e))}static create(e){var s,a,l,u;let r=new Yn(e),n=new Zn(e),i=new Tt(((s=r.find())==null?void 0:s.values)||[],((a=n.find())==null?void 0:a.values)||[]);return(u=(l=P(e).triptease)==null?void 0:l.events)==null||u.listen(()=>p(this,null,function*(){var m,h;return i.set(((m=r.find())==null?void 0:m.values)||[],((h=n.find())==null?void 0:h.values)||[])})),i}};var na=R(Cr());var Pt=class{generate(e){return oa(e)()}};function Xn(t){let e=new Error(t);return e.source="ulid",e}var ei="0123456789ABCDEFGHJKMNPQRSTVWXYZ",Et=ei.length,ia=Math.pow(2,48)-1,Ar=10;function Ad(t){let e=Math.floor(t()*Et);return e===Et&&(e=Et-1),ei.charAt(e)}function Od(t,e){if(isNaN(t))throw new Error(t+" must be a number");if(t>ia)throw Xn("cannot encode time greater than "+ia);if(t<0)throw Xn("time must be positive");if(!Number.isInteger(t))throw Xn("time must be an integer");let r,n="";for(;e>0;e--)r=t%Et,n=ei.charAt(r)+n,t=(t-r)/Et;return n}function Td(t,e){let r="";for(;t>0;t--)r=Ad(e)+r;return r}var Pd=L;function Ed(t=Pd.crypto){return()=>{try{let e=new Uint8Array(1);return t.getRandomValues(e),e[0]/255}catch(e){return Math.random()}}}function Id(t){if(tf(()=>e.getAnonymousIds(),[])))))})}setAnonymousId(e){return p(this,null,function*(){yield Promise.all(this.providers.map(r=>f(()=>r.setAnonymousId(e))))})}syncAnonymousIds(e){return p(this,null,function*(){return C.unique(C.flatten(yield Promise.all(this.providers.map(r=>f(()=>r.syncAnonymousIds(e),[])))))})}};var sa="triptease-anonymous-id",Rt=class{constructor(e){this.storage=e}getAnonymousIds(){return p(this,null,function*(){return this.get()})}setAnonymousId(e){return p(this,null,function*(){this.syncAnonymousIds([e])})}get(){let e=this.storage.get(sa);return e?Array.isArray(e)?e.flat():[e]:[]}syncAnonymousIds(e){return p(this,null,function*(){let r=this.get(),n=C.unique([...r,...e].flat());return this.storage.set(sa,n),n})}};var Qe=class{constructor(e){this.storage=e}get(e){let r=this.storage.getItem(e);if(r)return j.parseWithDates(r)}set(e,r){return this.storage.setItem(e,JSON.stringify(r)),this}clear(){this.storage.clear()}},Mt=class{constructor(){this.data=new Map}get(e){return this.data.get(e)}set(e,r){return this.data.set(e,r)}clear(){this.data.clear()}},ti=class{constructor(e){this.stores=e}clear(){this.stores.forEach(e=>f(()=>e.clear()))}get(e){for(let r of this.stores){let n=f(()=>r.get(e));if(n)return n}}set(e,r){return this.stores.forEach(n=>f(()=>n.set(e,r))),this}};var _t=R(We()),aa=R(he()),ca=R(Cr());var ri=class{static add(e,r){let n=new Date(e.getTime());return n.setUTCDate(e.getUTCDate()+r),n}};ri.milliseconds=24*60*60*1e3;function*Md(t,e){for(;t>=e;)yield t%e,t=Math.floor(t/e);yield t}function ni(t,e){return Array.from(t).reduce((r,n,i)=>r+mi(e,i)*n,0)}function*_d(t,e){for(let r of Hd(t,e))yield ni(r,2)}function*Dd(t,e){for(let r of t)for(let n=0;n0&&(yield r)}function*Ld(t){let e=t.BYTES_PER_ELEMENT*8;for(let r of t)for(let n=0;nthis.digits[r]).join("")}get lookup(){return[...this.digits].reduce((e,r,n)=>e.set(r,n),new Map)}decodeInteger(e){return ni(this.decode(e),this.base)}decodeBits(e){return Dd(this.decode(e),this.bitsPerCharacter)}decode(e){return[...e].map(r=>this.lookup.get(r))}};O([_t.lazy],Xe.prototype,"base",1),O([_t.lazy],Xe.prototype,"bitsPerCharacter",1),O([_t.lazy],Xe.prototype,"lookup",1);var we=new Xe("0123456789ABCDEFGHJKMNPQRSTVWXYZ"),qd=new Xe("0123456789ABCDEF"),da=class{static get detect(){try{let e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),new Int16Array(e)[0]===256?"LittleEndian":"BigEndian"}catch(e){return"Unknown"}}};O([_t.lazy],da,"detect",1);var N=class{constructor(e,r){this.timestamp=e;this.entropy=r;if(r.length%we.bitsPerCharacter!=0)throw Error(`entropy bit length must be a multiple of ${we.bitsPerCharacter}`)}toString(){let e=Tr(we.encodeInteger(this.timestamp.getTime())).padStart(N.TIMESTAMP_LENGTH,"0"),r=Tr(we.encodeBits(this.entropy));return e+r}static parse(e){if(!e)throw new Error("Invalid ULID");let r=e.slice(0,N.TIMESTAMP_LENGTH),n=e.slice(N.TIMESTAMP_LENGTH),i=we.decodeInteger(Tr(r));if(!un.isNumber(i))throw new Error("Invalid ULID");let s=we.decodeBits(Tr(n)),a=new Date(i);return new N(a,Array.from(s))}static create(e=N.DEFAULT_LENGTH,r=ua,n=new ca.SystemClock){if(ep(this,null,function*(){et.debug("TimeoutIdentityProvider delegate.syncAnonymousIds called",r);let n=yield this.delegate.syncAnonymousIds(e);return et.debug("TimeoutIdentityProvider delegate.syncAnonymousIds returned",n,r),n}))(),this.wait(r)])}getAnonymousIds(){let e=++this.raceCounter;return Promise.race([(()=>p(this,null,function*(){et.debug("TimeoutIdentityProvider delegate.getAnonymousIds called",e);let r=yield this.delegate.getAnonymousIds();return et.debug("TimeoutIdentityProvider delegate.getAnonymousIds returned",r,e),r}))(),this.wait(e)])}setAnonymousId(e){return p(this,null,function*(){et.debug("TimeoutIdentityProvider delegate.setAnonymousId called",e),this.delegate.setAnonymousId(e)})}wait(e){return p(this,null,function*(){return yield this.timers.delay(this.delay),et.debug(`TimeoutIdentityProvider waited for ${this.delay} ms`,e),[]})}};var oi=class{getAnonymousIds(){return p(this,null,function*(){return[]})}setAnonymousId(e){return p(this,null,function*(){})}syncAnonymousIds(e){return p(this,null,function*(){return e})}};function pa(t){return t.opener&&t.opener!==t?new Dt(800,ne(new fe(new J(t,t.opener,[])))):new oi}var Gd=y("identity"),si=class{constructor(e,r=3){this.delegate=e;this.limit=r}getAnonymousIds(){return p(this,null,function*(){return yield this.delegate.getAnonymousIds()})}setAnonymousId(e){return this.delegate.setAnonymousId(e)}internalSync(e,r=0){return p(this,null,function*(){if(r>this.limit)return Gd.error(`SynchronisingProvider syncAnonymousIds attempted more than ${this.limit} times`),e;let n=C.unique(e),i=C.unique(yield this.delegate.syncAnonymousIds(n));return n.length!==i.length?this.internalSync(i,r+1):i})}syncAnonymousIds(e){return p(this,null,function*(){return this.internalSync(e)})}};var fa=R(Cr());var ma=R(he()),Pr=class{constructor(e,r=new fa.SystemClock,n=$e({credentials:!0})){this.window=e;this.clock=r;this.httpClient=n}getQueryString(e,r){let n=`?userId=${e}`;return r?`${n}&sessionId=${r}`:n}getIdentityClientData(e,r){return p(this,null,function*(){let n=yield this.httpClient({url:`https://onboard.triptease.io/identity${this.getQueryString(e,r)}`,method:"GET"});if(n.status!==200)return{};let i=j.parseWithDates(n.body),s=f(()=>{let a=i.serverTime;return this.clock.now().getTime()-a.getTime()});return D(w({},i),{timeOffset:s})})}};O([ma.cache],Pr.prototype,"getIdentityClientData",1);var ci=R(ai()),rt=class{constructor(e,r,n=new Pr(e),i=new Pt){this.window=e;this.consent=r;this.identityClient=n;this.idGenerator=i}getIdentity(e){return p(this,null,function*(){let r=this.getIds();if(this.consent.thirdPartyStorage){let s=yield this.identityClient.getIdentityClientData(e,r.sessionId);return this.setIds(s),s}let n=r.userId||e||(0,ci.get)(()=>this.idGenerator.generate()),i=r.sessionId||(0,ci.get)(()=>this.idGenerator.generate());return this.setIds({sessionId:i,userId:n}),{isFreshUser:!r.userId,isFreshSession:!r.sessionId,userId:n,sessionId:i}})}getIds(){var e,r;try{return{userId:(e=this.window.sessionStorage.getItem(rt.USER_ID_KEY))!=null?e:void 0,sessionId:(r=this.window.sessionStorage.getItem(rt.SESSION_ID_KEY))!=null?r:void 0}}catch(n){}return{}}setIds({sessionId:e,userId:r}){try{this.window.sessionStorage.setItem(rt.SESSION_ID_KEY,e),this.window.sessionStorage.setItem(rt.USER_ID_KEY,r)}catch(n){}}},Ht=rt;Ht.USER_ID_KEY="triptease-user-id",Ht.SESSION_ID_KEY="triptease-session-id";var ga=y("identity"),li=class{constructor(e,r,n,i=new Ht(e,n),s=new Or(e,n),a=new Mt){this.window=e;this.kernelHost=r;this.consent=n;this.identityStore=i;this.domainUserId=s;this.inMemoryStorage=a;this._ids=new Set;this.build=()=>{ga.debug("Building identity providers");let e=[new Rt(this.inMemoryStorage),pa(this.window)];e.push(new ii(this.domainUserId)),this.consent.firstPartyStorage&&(e.push(f(()=>new Rt(new Qe(this.window.sessionStorage)))),e.push(f(()=>new Rt(new Qe(this.window.localStorage))))),this.consent.thirdPartyStorage&&e.push(new Dt(100,this.kernelHost)),this.identityProvider=new si(It.create(...e))};this.consent.onChange(this.build),this.build()}getIdentity(){return p(this,null,function*(){ga.debug("getIdentity called");let{domainUserId:e}=this.domainUserId.getId();return g.removeEmpty((yield Promise.all([{domainUserId:e},ee(()=>p(this,null,function*(){let r=yield this.identityStore.getIdentity(e);return this.ids=[r.userId],r}),{}),ee(()=>p(this,null,function*(){this.ids=yield this.identityProvider.syncAnonymousIds(this.ids)}),{})])).reduce((r,n)=>w(w({},r),n),{anonymousId:C.first(this.ids),anonymousIds:this.ids}))})}get ids(){return Array.from(this._ids).sort()}set ids(e){(Array.isArray(e)?e:[e]).filter(n=>f(()=>oe.parse(n))).forEach(n=>this._ids.add(n))}getAnonymousIds(){return this.identityProvider.getAnonymousIds()}setAnonymousId(e){return this.identityProvider.setAnonymousId(e)}syncAnonymousIds(e){return this.identityProvider.syncAnonymousIds(e)}};var Kd=y("bootstrap"),Ir=class{constructor(e=Qo(1e3*6,$e({credentials:!0}))){this.fetch=e}isClaim(e){return e&&typeof e=="object"&&Array.isArray(e.urls)&&e.urls.every(r=>r&&typeof r=="object"&&typeof r.url=="string"&&typeof r.urlSource=="string"&&typeof r.timestamp=="string"&&typeof r.trackingId=="string")}parseMessage(e){let r=f(()=>JSON.parse(e),{});return this.isClaim(r)?r:Ir.DefaultResponse}lookupClaim(e){return p(this,null,function*(){try{let{apiKey:r,claimKey:n}=e,i=new URL("https://onboard.triptease.io/claim");r&&i.searchParams.append("apiKey",r),n&&i.searchParams.append("claimKey",n);let s=yield this.fetch({method:"GET",url:i.toString()});if(s&&s.status===200)return this.parseMessage(s.body)}catch(r){Kd.debug("call to redirect /claim failed",r)}return Ir.DefaultResponse})}},Er=Ir;Er.DefaultResponse={urls:[]};function Rr(t){if(!t)return;let e=t instanceof Date?t:new Date(t);return isNaN(e.getTime())?void 0:e}var Lt="triptease.integration.previous-urls",ya="triptease.integration.previous-pages";function ha(t,e){if(typeof e!="object")return t;let{url:r,urlSource:n,timestamp:i,trackingId:s}=e!=null?e:{};return typeof r=="string"&&r.length!==0&&Cs.includes(n)&&t.push(g.removeEmpty({url:r,urlSource:n,timestamp:Rr(i),trackingId:s})),t}var ke=class{constructor(e){this.storage=e}static create(e){let r=new ti([f(()=>new Qe(e.sessionStorage)),ke.backupStorage]),n=new ke(r);return n.exists()&&(n.data=n.data),n}append(e){let r=this.data;return r.push(e),this.data=r,e}prepend(e){let r=this.data;return r.unshift(e),this.data=r,e}set data(e){this.storage.set(ke.storageKey,Ro(e.reduce(ha,[]),10))}get data(){let e=this.storage.get(ke.storageKey);return(Array.isArray(e)?e:[]).reduce(ha,[])}exists(){return!!this.storage.get(ke.storageKey)}clear(){this.storage.clear()}},qt=ke;qt.storageKey=Lt,qt.backupStorage=new Mt;var di=class{constructor(e,r=new Er,n=qt.create(e)){this.window=e;this.claimClient=r;this.urlHistory=n}urls(e,r){return p(this,null,function*(){if(!this.hasClaim()){let n=f(()=>{var s;return(s=Rr(r))==null?void 0:s.toISOString()});this.urlHistory.append({url:this.window.document.referrer,urlSource:"referrer",timestamp:n}),this.urlHistory.append({url:this.window.location.href,urlSource:"page",timestamp:n});let{tt_claim_key:i}=G(this.window.location.search);if(i||e){let{urls:s}=yield this.claimClient.lookupClaim({apiKey:e,claimKey:i});s.forEach(a=>this.urlHistory.prepend(a))}}return this.urlHistory.data})}hasClaim(){return this.urlHistory.exists()}};var ba=["app.triptease.io","gtm-spike.launchpad.triptease.io"];function zd(t,e){return U.PASSED}function Vd(t,e){return e?U.PASSED:U.FAILED}function Nd(t,e){return e?e.config?U.PASSED:U.PENDING:U.FAILED}function $d(t,e){return e?(t==null?void 0:t.integrationId)?e.config?t.integrationId===e.config.integrationId?U.PASSED:U.FAILED:U.PENDING:U.SKIPPED:U.FAILED}function Jd(t,e){return e?e.message?U.PASSED:U.PENDING:U.FAILED}var Yd={[pe.SCRIPT_PRESENT]:zd,[pe.SCRIPT_LOADED]:Vd,[pe.PAGE_EVALUATED]:Nd,[pe.INTEGRATION_ID_MATCHES]:$d,[pe.MESSAGING_ACTIVE]:Jd};function va(t,e){try{let r=Object.entries(Yd).reduce((n,[i,s])=>{let a=s(t,e);return[...n,{name:i,status:a}]},[]);return{type:"success",checks:r}}catch(r){return{type:"error",error:r.message}}}function Sa(t,e){var s;if(!t.includes("tt_claim_key")||!e.length)return!1;let r=(s=e.find(({url:a})=>a.includes("tt_claim_key")))==null?void 0:s.url;if(!r)return!0;let{tt_claim_key:n}=gr(t,["tt_claim_key"]),{tt_claim_key:i}=gr(r,["tt_claim_key"]);return!!(n&&i&&n!==i)}var wa=R(ai());var Zd=y("bootstrap"),Mr=class{constructor(e,r=new hn,n=Sr(e),i=Tt.create(e),s=new wn(e,r),a=Se.create(e),l=Je.create(e)){this.window=e;this.clock=r;this.events=n;this.consent=i;this.messageBatcher=s;this.starter=a;this.stackScripts=l;this.integrate=()=>p(this,null,function*(){try{this.logger.log("Starting integrate()");let e=Ls(this.window);P(this.window).onboard.integrationName=e;let r=Qd(e);yield this.starter.start(r)}catch(e){this.logger.error("Bootstrap.integrate: unhandled exception",e)}});P(this.window).onboard.bootstrap=this,this.clickTracking=new Fn(this.window,this)}get logger(){return this.trackingApi?new fn("bootstrap",this.trackingApi):Zd}start(){return p(this,null,function*(){try{this.logger.debug("Bootstrap starting"),q.exposeApi(),this.stackScripts.capture();let r=(yield this.kernelFrame()).contentWindow;if(!r){this.logger.log("Kernel frame did not generate a content window, aborting");return}let n=new J(this.window,r,[]),i=new bt(new fe(n));if(this.kernel=new xn(i),this.kernelHost=ne(i),this.clearStaleSessionStorage(),this.identityCombiner=new li(this.window,this.kernelHost,this.consent),P(this.window).onboard.messageBuilder=this.messageBuilder=new On(new yr(this.window),new di(this.window),this.identityCombiner),this.trackingApi=kt.create(this.window,this.messageBatcher,this.messageBuilder),new br(n,new hr().register(["processEvent","processConfig","processNavigation","updateKernelMode"],new Ye(this)).register(["getAnonymousIds","setAnonymousId","syncAnonymousIds"],new Ye(this.identityCombiner)).register(["trackConfig","trackEvent","trackError","trackMessage","trackLog"],new Ye(this.trackingApi))).registerAlias("triptease.event","processEvent").registerAlias("triptease.navigation","processNavigation").registerAlias("triptease.config","trackConfig").registerAlias("triptease.logs","trackLog"),this.window.opener&&this.window.opener!==this.window){let s=new J(this.window,this.window.opener,ba);new br(s,new hr().register(["evaluateHealth"],new Ye(this)))}this.applicationLoader=Ct.create(this.window,this.kernel,this.consent),this.clickTracking.start(),yield this.events.listen(this.integrate),yield this.events.start()}catch(e){this.logger.error("Bootstrap.start: unhandled exception",e)}})}stop(){this.messageBatcher.stop()}reload(){return p(this,null,function*(){yield this.start(),this.logger.debug("Bootstrap reloading"),this.stackScripts.capture(),yield this.integrate()})}kernelFrame(){return p(this,null,function*(){let e=yn.application(this.window.location.hostname);return yield this.starter.start(e)})}updateKernelMode(e){return p(this,null,function*(){yield P(this.window).triptease.integration.updateKernelMode(e)})}processEvent(e){return p(this,null,function*(){let r=yield this.kernelHost.getPageState(),n=yield this.messageBuilder.buildMessage(_.merge(e,r));yield ne(new fe(new J(void 0,window,[]))).trackEvent(n)})}processConfig(e){return p(this,null,function*(){let r=yield this.applicationLoader.loadApplications(e.payload);P(this.window).triptease.config=e.payload;let n=D(w({},e),{applications:r});P(this.window).triptease.message=n,this.logger.log("Broadcasting triptease.config message",{payload:n.payload,message:n}),new J(void 0,this.window).send(n)})}processNavigation(e){return p(this,null,function*(){let r=this.window.document.createElement("a");r.style.display="none",r.classList.add("triptease-navigation");for(let[n,i]of Object.entries(e))r[n]=i;this.window.document.documentElement.appendChild(r),r.click(),this.window.document.documentElement.removeChild(r)})}evaluateHealth(e){return p(this,null,function*(){var r;return va(e,(r=P(this.window))==null?void 0:r.triptease)})}clearStaleSessionStorage(){try{let e=(0,wa.get)(()=>{var n;return JSON.parse((n=this.window.sessionStorage.getItem(Lt))!=null?n:"[]")},[]);Sa(this.window.location.href,e)&&(this.logger.log("Clearing stale session storage"),this.window.sessionStorage.removeItem(Lt),this.window.sessionStorage.removeItem(ya))}catch(e){}}};O([xa.cache],Mr.prototype,"start",1);function Qd(t){return{name:t.name,url:t.script,type:"script",enabled:!0}}var ka=y("bootstrap"),Ca=f(()=>window.triptease.onboard.bootstrap);(()=>p(void 0,null,function*(){let{"triptease-bootstrap-version":t=""}=G(window.location.search);["none","noop"].includes(t.toLowerCase())||(Ca?(ka.log("Bootstrap reloading"),yield Ca.reload()):(ka.log("Creating new bootstrap"),yield new Mr(window).start()))}))();})();